From a627fe5afe8cc159ac24136c5862ffcf43f38bcd Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 20 Jun 2012 12:59:31 +0000 Subject: 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 --- bitbake/lib/bb/fetch2/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake') 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): 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) -- cgit v1.2.3-54-g00ecf