aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/bb/cooker.py2
-rw-r--r--lib/bb/data.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index d8535a7a4..1b5101db8 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -132,7 +132,7 @@ class BBCooker:
self.configuration.data = bb.data.init()
- bb.data.inheritFromOS(self.configuration.data)
+ bb.data.inheritFromOS(self.configuration.data, self.savedenv)
try:
self.parseConfigurationFiles(self.configuration.prefile,
diff --git a/lib/bb/data.py b/lib/bb/data.py
index 2269f9dc7..65144bfe5 100644
--- a/lib/bb/data.py
+++ b/lib/bb/data.py
@@ -159,12 +159,12 @@ def expandKeys(alterdata, readdata = None):
ekey = todolist[key]
renameVar(key, ekey, alterdata)
-def inheritFromOS(d):
- """Inherit variables from the environment."""
+def inheritFromOS(d, savedenv):
+ """Inherit variables from the initial environment."""
exportlist = bb.utils.preserved_envvars_exported()
- for s in os.environ.keys():
+ for s in savedenv.keys():
try:
- setVar(s, os.environ[s], d)
+ setVar(s, getVar(s, savedenv, True), d)
if s in exportlist:
setVarFlag(s, "export", True, d)
except TypeError: