mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 05:29:32 +00:00
bitbake: fetch2: Fix unpack for absolute file urls
The previous commit breaks absolute pathnames in file:// urls, this fixes it. (Bitbake rev: b8113a1800687a37a26ac28deafdbafd74cc138e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -1394,7 +1394,10 @@ class FetchMethod(object):
|
|||||||
destdir = '.'
|
destdir = '.'
|
||||||
# For file:// entries all intermediate dirs in path must be created at destination
|
# For file:// entries all intermediate dirs in path must be created at destination
|
||||||
if urldata.type == "file":
|
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:
|
if urlpath.find("/") != -1:
|
||||||
destdir = urlpath.rsplit("/", 1)[0] + '/'
|
destdir = urlpath.rsplit("/", 1)[0] + '/'
|
||||||
bb.utils.mkdirhier("%s/%s" % (unpackdir, destdir))
|
bb.utils.mkdirhier("%s/%s" % (unpackdir, destdir))
|
||||||
|
|||||||
Reference in New Issue
Block a user