summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2/__init__.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-24 14:16:52 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-29 12:07:47 +0100
commit46306912a96444790efa9418d934dfdd36773ba1 (patch)
tree6155aa4d524f42c4ff237a799558ffbc593f36e1 /lib/bb/fetch2/__init__.py
parent836a986b365eb9798563ec08d90b346596de7791 (diff)
downloadopenembedded-core-contrib-46306912a96444790efa9418d934dfdd36773ba1.tar.gz
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/__init__.py')
-rw-r--r--lib/bb/fetch2/__init__.py2
1 files changed, 2 insertions, 0 deletions
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')