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>
This commit is contained in:
parent
548465141a
commit
a627fe5afe
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue