diff options
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r-- | bitbake/lib/bb/utils.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 2469bd7ee2..3017ecfa4a 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -381,6 +381,16 @@ def empty_environment(): | |||
381 | os.unsetenv(s) | 381 | os.unsetenv(s) |
382 | del os.environ[s] | 382 | del os.environ[s] |
383 | 383 | ||
384 | def build_environment(d): | ||
385 | """ | ||
386 | Build an environment from all exported variables. | ||
387 | """ | ||
388 | import bb | ||
389 | for var in bb.data.keys(d): | ||
390 | export = bb.data.getVarFlag(var, "export", d) | ||
391 | if export: | ||
392 | os.environ[var] = bb.data.getVar(var, d, True) | ||
393 | |||
384 | def prunedir(topdir): | 394 | def prunedir(topdir): |
385 | # Delete everything reachable from the directory named in 'topdir'. | 395 | # Delete everything reachable from the directory named in 'topdir'. |
386 | # CAUTION: This is dangerous! | 396 | # CAUTION: This is dangerous! |