if not self.server_registration_cb:
bb.data.setVar("BB_WORKERCONTEXT", "1", self.configuration.data)
- bb.data.inheritFromOS(self.configuration.data)
+ bb.data.inheritFromOS(self.configuration.data, self.savedenv)
try:
self.parseConfigurationFiles(self.configuration.prefile,
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: