summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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):
441 # We may be obtaining a mirror tarball which needs further processing by the real fetcher 441 # We may be obtaining a mirror tarball which needs further processing by the real fetcher
442 # If that tarball is a local file:// we need to provide a symlink to it 442 # If that tarball is a local file:// we need to provide a symlink to it
443 dldir = ld.getVar("DL_DIR", True) 443 dldir = ld.getVar("DL_DIR", True)
444 if not ud.localpath.startswith(dldir): 444 if os.path.basename(ud.localpath) != os.path.basename(origud.localpath):
445 if os.path.basename(ud.localpath) != os.path.basename(origud.localpath): 445 dest = os.path.join(dldir, os.path.basename(ud.localpath))
446 os.symlink(ud.localpath, os.path.join(dldir, os.path.basename(ud.localpath))) 446 if not os.path.exists(dest):
447 return None 447 os.symlink(ud.localpath, dest)
448 return None
448 # Otherwise the result is a local file:// and we symlink to it 449 # Otherwise the result is a local file:// and we symlink to it
449 if not os.path.exists(origud.localpath): 450 if not os.path.exists(origud.localpath):
450 os.symlink(ud.localpath, origud.localpath) 451 os.symlink(ud.localpath, origud.localpath)