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

git at git.openembedded.org git at git.openembedded.org
Wed Mar 2 22:42:09 UTC 2016


rpurdie pushed a commit to branch master
in repository bitbake.

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

    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 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 9ebdcdb..e8d3af7 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))

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


More information about the Openembedded-commits mailing list