diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-20 12:59:31 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-21 13:08:19 +0100 |
commit | dcd79ae20ab2c72c3312b2251c2b6dc4cabe988e (patch) | |
tree | 7120e0aeece380ad275e23cf51af443aef6c808f | |
parent | 7619dcad29a6c2405b15a8fbadfa11e81b399ae1 (diff) | |
download | bitbake-dcd79ae20ab2c72c3312b2251c2b6dc4cabe988e.tar.gz |
fetch2: uri_replace() only consider ud.localpath where its a file
Using ud.localpath as a basename when it points at a directory causes
problems. The supports_checksum() method gives a good indication of whether
ud.localpath can be used in the way we need.
(From Poky rev: 933ec8a44634e33f92f6f76de3a34094c3d63aa6)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/fetch2/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index f81b845e4..88905f9b4 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -217,7 +217,7 @@ def uri_replace(ud, uri_find, uri_replace, d): basename = os.path.basename(ud.mirrortarball) # Kill parameters, they make no sense for mirror tarballs uri_decoded[5] = {} - elif ud.localpath: + elif ud.localpath and ud.method.supports_checksum(ud): basename = os.path.basename(ud.localpath) if basename and not result_decoded[loc].endswith(basename): result_decoded[loc] = os.path.join(result_decoded[loc], basename) |