summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2019-04-09 16:34:32 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-10 13:46:08 +0100
commit7fb540c3199bc2b82d60fff678b5e588ab4d1ad6 (patch)
tree7b2a01984ec4a6cae75c7e4d67121441988ada02
parent23c7a037a85a825aa088bfac3a144c14087a9f49 (diff)
downloadopenembedded-core-7fb540c3199bc2b82d60fff678b5e588ab4d1ad6.tar.gz
openembedded-core-7fb540c3199bc2b82d60fff678b5e588ab4d1ad6.tar.bz2
openembedded-core-7fb540c3199bc2b82d60fff678b5e588ab4d1ad6.zip
sstate.bbclass: Use bb.utils.to_boolean() for BB_NO_NETWORK
Make it consistent with bitbake Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/sstate.bbclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 6f51d9c187..424acfb155 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -689,7 +689,8 @@ def pstaging_fetch(sstatefetch, d):
# if BB_NO_NETWORK is set but we also have SSTATE_MIRROR_ALLOW_NETWORK,
# we'll want to allow network access for the current set of fetches.
- if localdata.getVar('BB_NO_NETWORK') == "1" and localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK') == "1":
+ if bb.utils.to_boolean(localdata.getVar('BB_NO_NETWORK')) and \
+ bb.utils.to_boolean(localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK')):
localdata.delVar('BB_NO_NETWORK')
# Try a fetch from the sstate mirror, if it fails just return and
@@ -867,7 +868,8 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False, *,
# if BB_NO_NETWORK is set but we also have SSTATE_MIRROR_ALLOW_NETWORK,
# we'll want to allow network access for the current set of fetches.
- if localdata.getVar('BB_NO_NETWORK') == "1" and localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK') == "1":
+ if bb.utils.to_boolean(localdata.getVar('BB_NO_NETWORK')) and \
+ bb.utils.to_boolean(localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK')):
localdata.delVar('BB_NO_NETWORK')
from bb.fetch2 import FetchConnectionCache