summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-20 12:59:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-21 13:10:33 +0100
commita627fe5afe8cc159ac24136c5862ffcf43f38bcd (patch)
tree2275d4ad5d56ea18e696832f6446fc08f6fdcc1a /bitbake/lib
parent548465141a6e34972b3ba440cab9c5106a82d7ca (diff)
downloadpoky-a627fe5afe8cc159ac24136c5862ffcf43f38bcd.tar.gz
bitbake: 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) (Bitbake rev: dcd79ae20ab2c72c3312b2251c2b6dc4cabe988e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index f81b845e4d..88905f9b4b 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -217,7 +217,7 @@ def uri_replace(ud, uri_find, uri_replace, d):
217 basename = os.path.basename(ud.mirrortarball) 217 basename = os.path.basename(ud.mirrortarball)
218 # Kill parameters, they make no sense for mirror tarballs 218 # Kill parameters, they make no sense for mirror tarballs
219 uri_decoded[5] = {} 219 uri_decoded[5] = {}
220 elif ud.localpath: 220 elif ud.localpath and ud.method.supports_checksum(ud):
221 basename = os.path.basename(ud.localpath) 221 basename = os.path.basename(ud.localpath)
222 if basename and not result_decoded[loc].endswith(basename): 222 if basename and not result_decoded[loc].endswith(basename):
223 result_decoded[loc] = os.path.join(result_decoded[loc], basename) 223 result_decoded[loc] = os.path.join(result_decoded[loc], basename)