From 3ef2d39dbf8a573acfbf633c1d5d7cb3cee18788 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 16 Feb 2011 12:35:35 +0000 Subject: bitbake/fecth2: Ensure BB_FETCH_PREMIRRORONLY being set as false is handled correctly Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/fetch2') diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index a5ba166a89..fb8e9e4d0c 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): -- cgit v1.2.3-54-g00ecf