diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2019-04-08 17:40:32 +0800 |
---|---|---|
committer | Robert Yang <liezhi.yang@windriver.com> | 2019-04-09 16:32:35 +0800 |
commit | 783186c33501d4494c7592649cf606551aadfa7f (patch) | |
tree | 4319c596f8583a95b2ea3121d5fca31b4f6662ef | |
parent | d7c0e9d1800912a0f35fb554d54945b728a04a6f (diff) | |
download | openembedded-core-contrib-rbt/bool.tar.gz |
sstate.bbclass: Use bb.utils.to_boolean() for BB_NO_NETWORKrbt/bool
Make it consistent with bitbake
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-rw-r--r-- | meta/classes/sstate.bbclass | 6 |
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 |