Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] sstate.bbclass: Use bb.utils.to_boolean() for BB_NO_NETWORK
@ 2019-04-09  8:34 Robert Yang
  2019-04-09  8:34 ` [PATCH 1/1] " Robert Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Yang @ 2019-04-09  8:34 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit d7c0e9d1800912a0f35fb554d54945b728a04a6f:

  gtk+: update for new catalog path (2019-04-05 17:27:40 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/bool
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/bool

Robert Yang (1):
  sstate.bbclass: Use bb.utils.to_boolean() for BB_NO_NETWORK

 meta/classes/sstate.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

-- 
2.7.4



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] sstate.bbclass: Use bb.utils.to_boolean() for BB_NO_NETWORK
  2019-04-09  8:34 [PATCH 0/1] sstate.bbclass: Use bb.utils.to_boolean() for BB_NO_NETWORK Robert Yang
@ 2019-04-09  8:34 ` Robert Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2019-04-09  8:34 UTC (permalink / raw)
  To: openembedded-core

Make it consistent with bitbake

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/sstate.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 6f51d9c..424acfb 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
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-09  8:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-09  8:34 [PATCH 0/1] sstate.bbclass: Use bb.utils.to_boolean() for BB_NO_NETWORK Robert Yang
2019-04-09  8:34 ` [PATCH 1/1] " Robert Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox