[bitbake-devel] [master][PATCH] bb.cooker: only emit a var as python if 'func' is set

Christopher Larson kergoth at gmail.com
Sat Apr 30 19:52:47 UTC 2016


From: Christopher Larson <chris_larson at mentor.com>

This avoids a common issue where PACKAGECONFIG is emitted as a function in
bitbake -e when the 'python' flag exists. It isn't a python function unless
both 'func' and 'python' are set. This aligns with the behavior of
emit_func_python.

Signed-off-by: Christopher Larson <chris_larson at mentor.com>
---
 lib/bb/cooker.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 9b565fc..b2187d7 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -656,7 +656,7 @@ class BBCooker:
         # emit the metadata which isnt valid shell
         data.expandKeys(envdata)
         for e in envdata.keys():
-            if data.getVarFlag( e, 'python', envdata ):
+            if envdata.getVarFlag(e, 'func', False) and envdata.getVarFlag(e, 'python', False):
                 logger.plain("\npython %s () {\n%s}\n", e, envdata.getVar(e, False))
 
 
-- 
2.8.0




More information about the bitbake-devel mailing list