Skip to contentSkip to conversation

package.bbclass, prserv.bbclass: Compare USE_PR_SERV with "1" or "0"

PATCH New Khem Raj 1 participant 1 message May 28, 2011

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 package.bbclass, prserv.bbclass: Compare USE_PR_SERV with "1" or "0"

Value of USE_PR_SERV is either "1" or "0" looking at
settings in bitbake.conf
USE_PR_SERV = "${@[1,0][(bb.data.getVar('PRSERV_HOST',d,1) is None) or (bb.data.getVar('PRSERV_PORT',d,1) is None)]}" So we compare the strings

---
 meta/classes/package.bbclass |    2 +-
 meta/classes/prserv.bbclass  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/classes/package.bbclass +1 -1
index a1b9482..1e6a872 100644
@@ -330,7 +330,7 @@ def runtime_mapping_rename (varname, d):
 #
 
 python package_get_auto_pr() {
-	if d.getVar('USE_PR_SERV', True):
+	if d.getVar('USE_PR_SERV', True) != "0":
 		auto_pr=prserv_get_pr_auto(d)
 		if auto_pr is None:
 			bb.fatal("Can NOT get auto PR revision from remote PR service")
meta/classes/prserv.bbclass +1 -1
index de46ff6..18b8589 100644
@@ -12,7 +12,7 @@ def prserv_make_conn(d):
     return conn
 
 def prserv_get_pr_auto(d):
-    if not d.getVar('USE_PR_SERV', True):
+    if d.getVar('USE_PR_SERV', True) != "0":
         bb.warn("Not using network based PR service")
         return None
 
Signature · 1 line
1.7.4.1