summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 5d7ef1f014..ba6849e09d 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -476,10 +476,8 @@ def try_mirrors(d, origud, mirrors, check = False):
476 476
477 if not os.path.exists(ud.donestamp) or ud.method.need_update(newuri, ud, ld): 477 if not os.path.exists(ud.donestamp) or ud.method.need_update(newuri, ud, ld):
478 ud.method.download(newuri, ud, ld) 478 ud.method.download(newuri, ud, ld)
479 if os.path.exists(ud.localpath): 479 if hasattr(ud.method,"build_mirror_data"):
480 open(ud.donestamp, 'w').close() 480 ud.method.build_mirror_data(newuri, ud, ld)
481 if hasattr(ud.method,"build_mirror_data"):
482 ud.method.build_mirror_data(newuri, ud, ld)
483 481
484 if not ud.localpath or not os.path.exists(ud.localpath): 482 if not ud.localpath or not os.path.exists(ud.localpath):
485 continue 483 continue
@@ -491,6 +489,7 @@ def try_mirrors(d, origud, mirrors, check = False):
491 # If that tarball is a local file:// we need to provide a symlink to it 489 # If that tarball is a local file:// we need to provide a symlink to it
492 dldir = ld.getVar("DL_DIR", True) 490 dldir = ld.getVar("DL_DIR", True)
493 if os.path.basename(ud.localpath) != os.path.basename(origud.localpath): 491 if os.path.basename(ud.localpath) != os.path.basename(origud.localpath):
492 open(ud.donestamp, 'w').close()
494 dest = os.path.join(dldir, os.path.basename(ud.localpath)) 493 dest = os.path.join(dldir, os.path.basename(ud.localpath))
495 if not os.path.exists(dest): 494 if not os.path.exists(dest):
496 os.symlink(ud.localpath, dest) 495 os.symlink(ud.localpath, dest)
@@ -498,6 +497,7 @@ def try_mirrors(d, origud, mirrors, check = False):
498 # Otherwise the result is a local file:// and we symlink to it 497 # Otherwise the result is a local file:// and we symlink to it
499 if not os.path.exists(origud.localpath): 498 if not os.path.exists(origud.localpath):
500 os.symlink(ud.localpath, origud.localpath) 499 os.symlink(ud.localpath, origud.localpath)
500 update_stamp(newuri, origud, ld)
501 return ud.localpath 501 return ud.localpath
502 502
503 except bb.fetch2.NetworkAccess: 503 except bb.fetch2.NetworkAccess: