diff options
author | Christopher Larson <chris_larson@mentor.com> | 2016-04-30 13:10:34 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-06 10:22:18 +0100 |
commit | c6394a56f71028982006a821190c538c095a12f5 (patch) | |
tree | c9afb974d3ad7e627536d3f148ab41854dc1e04b /bitbake/lib/bb/data.py | |
parent | 94655584cba7543781a8d45fdacbb6027a38b07c (diff) | |
download | poky-c6394a56f71028982006a821190c538c095a12f5.tar.gz |
bitbake: bb.{cooker, data}: only emit a var as python if 'func' is set
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.
(Bitbake rev: c5e45063cb3ae17bbe3304ea5e712bd76e686c4a)
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data.py')
-rw-r--r-- | bitbake/lib/bb/data.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py index dbc6dea68d..b5dcdbd8f8 100644 --- a/bitbake/lib/bb/data.py +++ b/bitbake/lib/bb/data.py | |||
@@ -182,12 +182,12 @@ def inheritFromOS(d, savedenv, permitted): | |||
182 | 182 | ||
183 | def emit_var(var, o=sys.__stdout__, d = init(), all=False): | 183 | def emit_var(var, o=sys.__stdout__, d = init(), all=False): |
184 | """Emit a variable to be sourced by a shell.""" | 184 | """Emit a variable to be sourced by a shell.""" |
185 | if d.getVarFlag(var, "python", False): | 185 | func = d.getVarFlag(var, "func", False) |
186 | if d.getVarFlag(var, 'python', False) and func: | ||
186 | return False | 187 | return False |
187 | 188 | ||
188 | export = d.getVarFlag(var, "export", False) | 189 | export = d.getVarFlag(var, "export", False) |
189 | unexport = d.getVarFlag(var, "unexport", False) | 190 | unexport = d.getVarFlag(var, "unexport", False) |
190 | func = d.getVarFlag(var, "func", False) | ||
191 | if not all and not export and not unexport and not func: | 191 | if not all and not export and not unexport and not func: |
192 | return False | 192 | return False |
193 | 193 | ||