summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index a7da899c22..d911307f6e 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -560,7 +560,11 @@ def try_mirror_url(newuri, origud, ud, ld, check = False):
560 return None 560 return None
561 # Otherwise the result is a local file:// and we symlink to it 561 # Otherwise the result is a local file:// and we symlink to it
562 if not os.path.exists(origud.localpath): 562 if not os.path.exists(origud.localpath):
563 os.symlink(ud.localpath, origud.localpath) 563 if os.path.islink(origud.localpath):
564 # Broken symbolic link
565 os.unlink(origud.localpath)
566
567 os.symlink(ud.localpath, origud.localpath)
564 update_stamp(newuri, origud, ld) 568 update_stamp(newuri, origud, ld)
565 return ud.localpath 569 return ud.localpath
566 570