diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-26 17:36:49 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-02 22:41:22 +0000 |
| commit | 2a7318133bbd64f5dcb2ddf400229d4627925580 (patch) | |
| tree | 27e73e3fd9fe8a66e6459b0e6890419361c5e437 | |
| parent | 865d2feff6178010a21a994e9ed8b155671dc160 (diff) | |
| download | poky-2a7318133bbd64f5dcb2ddf400229d4627925580.tar.gz | |
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>
| -rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 9ebdcdb91d..e8d3af72e8 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
| @@ -1394,7 +1394,10 @@ class FetchMethod(object): | |||
| 1394 | destdir = '.' | 1394 | destdir = '.' |
| 1395 | # For file:// entries all intermediate dirs in path must be created at destination | 1395 | # For file:// entries all intermediate dirs in path must be created at destination |
| 1396 | if urldata.type == "file": | 1396 | if urldata.type == "file": |
| 1397 | urlpath = urldata.path.rstrip('/') # Trailing '/' does a copying to wrong place | 1397 | # Trailing '/' does a copying to wrong place |
| 1398 | urlpath = urldata.path.rstrip('/') | ||
| 1399 | # Want files places relative to cwd so no leading '/' | ||
| 1400 | urlpath = urlpath.lstrip('/') | ||
| 1398 | if urlpath.find("/") != -1: | 1401 | if urlpath.find("/") != -1: |
| 1399 | destdir = urlpath.rsplit("/", 1)[0] + '/' | 1402 | destdir = urlpath.rsplit("/", 1)[0] + '/' |
| 1400 | bb.utils.mkdirhier("%s/%s" % (unpackdir, destdir)) | 1403 | bb.utils.mkdirhier("%s/%s" % (unpackdir, destdir)) |
