summaryrefslogtreecommitdiffstats
path: root/meta/classes
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:17 +0100
commitbd2b7d22132937cba2491c8ed8256a259b8fcbb1 (patch)
treece5a1e0ac7aa6095327b26c65066274af10de583 /meta/classes
parent974d786d0886e3b9b3a34a01dc3db59a02d06e9b (diff)
downloadpoky-bd2b7d22132937cba2491c8ed8256a259b8fcbb1.tar.gz
sstate.bbclass: Use bb.utils.to_boolean() for BB_NO_NETWORK
Make it consistent with bitbake (From OE-Core rev: 7fb540c3199bc2b82d60fff678b5e588ab4d1ad6) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-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):
689 689
690 # if BB_NO_NETWORK is set but we also have SSTATE_MIRROR_ALLOW_NETWORK, 690 # if BB_NO_NETWORK is set but we also have SSTATE_MIRROR_ALLOW_NETWORK,
691 # we'll want to allow network access for the current set of fetches. 691 # we'll want to allow network access for the current set of fetches.
692 if localdata.getVar('BB_NO_NETWORK') == "1" and localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK') == "1": 692 if bb.utils.to_boolean(localdata.getVar('BB_NO_NETWORK')) and \
693 bb.utils.to_boolean(localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK')):
693 localdata.delVar('BB_NO_NETWORK') 694 localdata.delVar('BB_NO_NETWORK')
694 695
695 # Try a fetch from the sstate mirror, if it fails just return and 696 # 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, *,
867 868
868 # if BB_NO_NETWORK is set but we also have SSTATE_MIRROR_ALLOW_NETWORK, 869 # if BB_NO_NETWORK is set but we also have SSTATE_MIRROR_ALLOW_NETWORK,
869 # we'll want to allow network access for the current set of fetches. 870 # we'll want to allow network access for the current set of fetches.
870 if localdata.getVar('BB_NO_NETWORK') == "1" and localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK') == "1": 871 if bb.utils.to_boolean(localdata.getVar('BB_NO_NETWORK')) and \
872 bb.utils.to_boolean(localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK')):
871 localdata.delVar('BB_NO_NETWORK') 873 localdata.delVar('BB_NO_NETWORK')
872 874
873 from bb.fetch2 import FetchConnectionCache 875 from bb.fetch2 import FetchConnectionCache