summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 5a4321f068..e2255e7b7d 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1072,6 +1072,7 @@ class RunQueueExecute:
1072 # a fork() or exec*() activates PSEUDO... 1072 # a fork() or exec*() activates PSEUDO...
1073 1073
1074 envbackup = {} 1074 envbackup = {}
1075 fakeenv = {}
1075 umask = None 1076 umask = None
1076 1077
1077 taskdep = self.rqdata.dataCache.task_deps[fn] 1078 taskdep = self.rqdata.dataCache.task_deps[fn]
@@ -1087,6 +1088,7 @@ class RunQueueExecute:
1087 for key, value in (var.split('=') for var in envvars): 1088 for key, value in (var.split('=') for var in envvars):
1088 envbackup[key] = os.environ.get(key) 1089 envbackup[key] = os.environ.get(key)
1089 os.environ[key] = value 1090 os.environ[key] = value
1091 fakeenv[key] = value
1090 1092
1091 fakedirs = (self.rqdata.dataCache.fakerootdirs[fn] or "").split() 1093 fakedirs = (self.rqdata.dataCache.fakerootdirs[fn] or "").split()
1092 for p in fakedirs: 1094 for p in fakedirs:
@@ -1136,7 +1138,14 @@ class RunQueueExecute:
1136 for h in self.rqdata.hash_deps: 1138 for h in self.rqdata.hash_deps:
1137 the_data.setVar("BBHASHDEPS_%s" % h, self.rqdata.hash_deps[h]) 1139 the_data.setVar("BBHASHDEPS_%s" % h, self.rqdata.hash_deps[h])
1138 1140
1139 os.environ.update(bb.data.exported_vars(the_data)) 1141 # exported_vars() returns a generator which *cannot* be passed to os.environ.update()
1142 # successfully. We also need to unset anything from the environment which shouldn't be there
1143 exports = bb.data.exported_vars(the_data)
1144 bb.utils.empty_environment()
1145 for e, v in exports:
1146 os.environ[e] = v
1147 for e in fakeenv:
1148 os.environ[e] = fakeenv[e]
1140 1149
1141 if quieterrors: 1150 if quieterrors:
1142 the_data.setVarFlag(taskname, "quieterrors", "1") 1151 the_data.setVarFlag(taskname, "quieterrors", "1")