[oe-commits] [bitbake] 02/07: fetch2: Fix unpack for absolute file urls

git at git.openembedded.org git at git.openembedded.org
Fri Feb 26 17:59:14 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

commit bcebe4fcc904a32785f581fc06de5529b56b0d14
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Fri Feb 26 17:36:49 2016 +0000

    fetch2: Fix unpack for absolute file urls
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/fetch2/__init__.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 2d31493..5187b62 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -1376,7 +1376,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))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list