summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-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 2eeec3dd51..b09753f574 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -486,6 +486,8 @@ def try_mirrors(d, origud, mirrors, check = False):
486 ud = FetchData(newuri, ld) 486 ud = FetchData(newuri, ld)
487 ud.setup_localpath(ld) 487 ud.setup_localpath(ld)
488 488
489 os.chdir(ld.getVar("DL_DIR", True))
490
489 if check: 491 if check:
490 found = ud.method.checkstatus(newuri, ud, ld) 492 found = ud.method.checkstatus(newuri, ud, ld)
491 if found: 493 if found:
@@ -1094,6 +1096,8 @@ class Fetch(object):
1094 if premirroronly: 1096 if premirroronly:
1095 self.d.setVar("BB_NO_NETWORK", "1") 1097 self.d.setVar("BB_NO_NETWORK", "1")
1096 1098
1099 os.chdir(self.d.getVar("DL_DIR", True))
1100
1097 firsterr = None 1101 firsterr = None
1098 if not localpath and ((not os.path.exists(ud.donestamp)) or m.need_update(u, ud, self.d)): 1102 if not localpath and ((not os.path.exists(ud.donestamp)) or m.need_update(u, ud, self.d)):
1099 try: 1103 try:
@@ -1155,7 +1159,7 @@ class Fetch(object):
1155 except: 1159 except:
1156 # Finally, try checking uri, u, from MIRRORS 1160 # Finally, try checking uri, u, from MIRRORS
1157 mirrors = mirror_from_string(self.d.getVar('MIRRORS', True)) 1161 mirrors = mirror_from_string(self.d.getVar('MIRRORS', True))
1158 ret = try_mirrors (self.d, ud, mirrors, True) 1162 ret = try_mirrors(self.d, ud, mirrors, True)
1159 1163
1160 if not ret: 1164 if not ret:
1161 raise FetchError("URL %s doesn't work" % u, u) 1165 raise FetchError("URL %s doesn't work" % u, u)