summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index a5ba166a8..fb8e9e4d0 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -903,6 +903,7 @@ class Fetch(object):
urls = self.urls
network = bb.data.getVar("BB_NO_NETWORK", self.d, True)
+ premirroronly = (bb.data.getVar("BB_FETCH_PREMIRRORONLY", self.d, True) == "1")
for u in urls:
ud = self.ud[u]
@@ -925,7 +926,7 @@ class Fetch(object):
mirrors = mirror_from_string(bb.data.getVar('PREMIRRORS', self.d, True))
localpath = try_mirrors(self.d, ud, mirrors, False)
- if bb.data.getVar("BB_FETCH_PREMIRRORONLY", self.d, True) is not None:
+ if premirroronly:
bb.data.setVar("BB_NO_NETWORK", "1", self.d)
if not localpath and m.need_update(u, ud, self.d):