From 46306912a96444790efa9418d934dfdd36773ba1 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 24 Sep 2014 14:16:52 +0000 Subject: fetch: Extend testing of subdir unpack parameter and fix This fixes urls of the form file://some/path/file;subdir=b. It also adds in a couple of tests so we now tests these corner cases. Signed-off-by: Richard Purdie --- lib/bb/fetch2/__init__.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/bb/fetch2/__init__.py') diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index 68c8329e2b..87cf7e61a6 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -1264,6 +1264,8 @@ class FetchMethod(object): # items. So, only do so for file:// entries. if urldata.type == "file" and urldata.path.find("/") != -1: destdir = urldata.path.rsplit("/", 1)[0] + if urldata.parm.get('subdir') != None: + destdir = urldata.parm.get('subdir') + "/" + destdir else: if urldata.parm.get('subdir') != None: destdir = urldata.parm.get('subdir') -- cgit 1.2.3-korg