summaryrefslogtreecommitdiffstats
path: root/lib/bb/data.py
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-11-28 17:39:09 +0000
committerChris Larson <chris_larson@mentor.com>2010-12-29 23:51:07 -0700
commit8bc6f3eb7f735e606202393542b8b610d0cbc3d8 (patch)
tree04a7ff124876ba13b2d811fdbed50af6393f891a /lib/bb/data.py
parentc30630548b66e59e055e372bec4736d118bac131 (diff)
downloadbitbake-8bc6f3eb7f735e606202393542b8b610d0cbc3d8.tar.gz
Overhaul environment handling
Currently, anything whitelisted in the environment makes it into the worker processes. This is undesireable and the worker environment should be as clean as possible. This patch adapts bitbake sosme variables are loaded into bitbake's datastore but not exported by default. Any variable can be exported by setting its export flag. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com> Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/data.py')
-rw-r--r--lib/bb/data.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bb/data.py b/lib/bb/data.py
index cf83c506c..e472cd24d 100644
--- a/lib/bb/data.py
+++ b/lib/bb/data.py
@@ -161,10 +161,12 @@ def expandKeys(alterdata, readdata = None):
def inheritFromOS(d):
"""Inherit variables from the environment."""
+ exportlist = bb.utils.preserved_envvars_exported()
for s in os.environ.keys():
try:
setVar(s, os.environ[s], d)
- setVarFlag(s, "export", True, d)
+ if s in exportlist:
+ setVarFlag(s, "export", True, d)
except TypeError:
pass