diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-12-21 20:23:22 -0500 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2010-12-30 08:47:41 -0700 |
commit | 64d945b2b66ae6f71b7aebd713f1be047bd22bbe (patch) | |
tree | 802bd9e79e9637d1646e218748cd82e1c9ebcf6e /lib/bb/data.py | |
parent | 49d8852c231e4437a9b29e0986a9acf365559546 (diff) | |
download | bitbake-64d945b2b66ae6f71b7aebd713f1be047bd22bbe.tar.gz |
Include exported variables in task process env
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/data.py')
-rw-r--r-- | lib/bb/data.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/bb/data.py b/lib/bb/data.py index e472cd24d..7b4590417 100644 --- a/lib/bb/data.py +++ b/lib/bb/data.py @@ -232,6 +232,21 @@ def emit_env(o=sys.__stdout__, d = init(), all=False): for key in keys: emit_var(key, o, d, all and not isfunc) and o.write('\n') +def exported_keys(d): + return (key for key in d.keys() if not key.startswith('__') and + d.getVarFlag(key, 'export') and + not d.getVarFlag(key, 'unexport')) + +def exported_vars(d): + for key in exported_keys(d): + try: + value = d.getVar(key, True) + except Exception: + pass + + if value is not None: + yield key, str(value) + def emit_func(func, o=sys.__stdout__, d = init()): """Emits all items in the data store in a format such that it can be sourced by a shell.""" |