From patchwork Wed Jun 20 14:13:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel, 13/14] fetch2: uri_replace() only consider ud.localpath where its a file Date: Wed, 20 Jun 2012 14:13:04 -0000 From: Richard Purdie X-Patchwork-Id: 30289 Message-Id: To: bitbake-devel@lists.openembedded.org 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. Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/__init__.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 63e2e48..e222fdb 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)