aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-11 12:06:44 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-11 12:06:44 +0000
commit7f30131faaa5e3fdb1191c9da95c5683cefafeb5 (patch)
tree80a690dce32420f0acaa7ba3f3b1f931f4d4e3c6 /bitbake
parent20ab1cb0ca10b0c7724f2154fe5b54c939b8a887 (diff)
downloadopenembedded-core-contrib-7f30131faaa5e3fdb1191c9da95c5683cefafeb5.tar.gz
bitbake/fetch2: Correctly handle git mirror tarball fetching
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index d168cdff6b..b9e145a62b 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -441,10 +441,11 @@ def try_mirrors(d, origud, mirrors, 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 not ud.localpath.startswith(dldir):
- if os.path.basename(ud.localpath) != os.path.basename(origud.localpath):
- os.symlink(ud.localpath, os.path.join(dldir, os.path.basename(ud.localpath)))
- return None
+ if os.path.basename(ud.localpath) != os.path.basename(origud.localpath):
+ dest = os.path.join(dldir, os.path.basename(ud.localpath))
+ if not os.path.exists(dest):
+ os.symlink(ud.localpath, dest)
+ return None
# Otherwise the result is a local file:// and we symlink to it
if not os.path.exists(origud.localpath):
os.symlink(ud.localpath, origud.localpath)