summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bb/fetch2/__init__.py')
-rw-r--r--lib/bb/fetch2/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 5df642e37..e8cea7feb 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -915,6 +915,10 @@ def rename_bad_checksum(ud, suffix):
def try_mirror_url(fetch, origud, ud, ld, check = False):
# Return of None or a value means we're finished
# False means try another url
+
+ if ud.lockfile and ud.lockfile != origud.lockfile:
+ lf = bb.utils.lockfile(ud.lockfile)
+
try:
if check:
found = ud.method.checkstatus(fetch, ud, ld)
@@ -980,6 +984,10 @@ def try_mirror_url(fetch, origud, ud, ld, check = False):
except UnboundLocalError:
pass
return False
+ finally:
+ if ud.lockfile and ud.lockfile != origud.lockfile:
+ bb.utils.unlockfile(lf)
+
def try_mirrors(fetch, d, origud, mirrors, check = False):
"""