bitbake/fecth2: Ensure BB_FETCH_PREMIRRORONLY being set as false is handled correctly

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2011-02-16 12:35:35 +00:00
parent 7e4c694c9f
commit 3ef2d39dbf
1 changed files with 2 additions and 1 deletions

View File

@ -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):