From patchwork Wed Jun 20 14:12:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel, 06/14] fetch2: Explicitly check for mirror tarballs in mirror handling code Date: Wed, 20 Jun 2012 14:12:57 -0000 From: Richard Purdie X-Patchwork-Id: 30295 Message-Id: <4cae80188fd6ef26919b5ddb40acb0888f7d09d5.1340200208.git.richard.purdie@linuxfoundation.org> To: bitbake-devel@lists.openembedded.org With support for things like git:// -> git:// urls, we need to be more explicity about the mirrortarball check since we need to fall through to the following code in other cases. Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/__init__.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index e4af951..a2e0beb 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -490,7 +490,8 @@ def try_mirror_url(newuri, origud, ud, ld, check = False): # We may be obtaining a mirror tarball which needs further processing by the real fetcher # If that tarball is a local file:// we need to provide a symlink to it dldir = ld.getVar("DL_DIR", True) - if os.path.basename(ud.localpath) != os.path.basename(origud.localpath): + if os.path.basename(ud.localpath) == os.path.basename(origud.mirrortarball) \ + and os.path.basename(ud.localpath) != os.path.basename(origud.localpath): open(ud.donestamp, 'w').close() dest = os.path.join(dldir, os.path.basename(ud.localpath)) if not os.path.exists(dest):