summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2/__init__.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-26 17:36:49 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-02 22:40:27 +0000
commitb8113a1800687a37a26ac28deafdbafd74cc138e (patch)
tree7d28e7ac0592529744ebbbc73457773326e80567 /lib/bb/fetch2/__init__.py
parente659a3b0c2771679057ee3e13cd42e6c62383ff2 (diff)
downloadopenembedded-core-contrib-b8113a1800687a37a26ac28deafdbafd74cc138e.tar.gz
fetch2: Fix unpack for absolute file urls
The previous commit breaks absolute pathnames in file:// urls, this fixes it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/__init__.py')
-rw-r--r--lib/bb/fetch2/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 9ebdcdb91d..e8d3af72e8 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -1394,7 +1394,10 @@ class FetchMethod(object):
destdir = '.'
# For file:// entries all intermediate dirs in path must be created at destination
if urldata.type == "file":
- urlpath = urldata.path.rstrip('/') # Trailing '/' does a copying to wrong place
+ # Trailing '/' does a copying to wrong place
+ urlpath = urldata.path.rstrip('/')
+ # Want files places relative to cwd so no leading '/'
+ urlpath = urlpath.lstrip('/')
if urlpath.find("/") != -1:
destdir = urlpath.rsplit("/", 1)[0] + '/'
bb.utils.mkdirhier("%s/%s" % (unpackdir, destdir))