diff options
Diffstat (limited to 'bitbake/lib/bb/data.py')
| -rw-r--r-- | bitbake/lib/bb/data.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py index fee10ccda4..d4d43fd8c8 100644 --- a/bitbake/lib/bb/data.py +++ b/bitbake/lib/bb/data.py | |||
| @@ -161,10 +161,12 @@ def expandKeys(alterdata, readdata = None): | |||
| 161 | 161 | ||
| 162 | def inheritFromOS(d): | 162 | def inheritFromOS(d): |
| 163 | """Inherit variables from the environment.""" | 163 | """Inherit variables from the environment.""" |
| 164 | exportlist = bb.utils.preserved_envvars_export_list() | ||
| 164 | for s in os.environ.keys(): | 165 | for s in os.environ.keys(): |
| 165 | try: | 166 | try: |
| 166 | setVar(s, os.environ[s], d) | 167 | setVar(s, os.environ[s], d) |
| 167 | setVarFlag(s, "export", True, d) | 168 | if s in exportlist: |
| 169 | setVarFlag(s, "export", True, d) | ||
| 168 | except TypeError: | 170 | except TypeError: |
| 169 | pass | 171 | pass |
| 170 | 172 | ||
| @@ -244,6 +246,12 @@ def export_vars(d): | |||
| 244 | pass | 246 | pass |
| 245 | return ret | 247 | return ret |
| 246 | 248 | ||
| 249 | def export_envvars(v, d): | ||
| 250 | for s in os.environ.keys(): | ||
| 251 | if s not in v: | ||
| 252 | v[s] = os.environ[s] | ||
| 253 | return v | ||
| 254 | |||
| 247 | def emit_func(func, o=sys.__stdout__, d = init()): | 255 | def emit_func(func, o=sys.__stdout__, d = init()): |
| 248 | """Emits all items in the data store in a format such that it can be sourced by a shell.""" | 256 | """Emits all items in the data store in a format such that it can be sourced by a shell.""" |
| 249 | 257 | ||
