diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-08 20:16:56 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-08 20:38:28 +0100 |
commit | c7f76a1bc9868ea4709688967d9794acd4d784ec (patch) | |
tree | 0599fe8923b2dc0a89853b03b4eb17b836bacc54 /bitbake/lib/bb/runqueue.py | |
parent | bdab8e93543bfc0d7b07c61da043b410036ac2c7 (diff) | |
download | poky-c7f76a1bc9868ea4709688967d9794acd4d784ec.tar.gz |
bitbake/data/runqueue: Sync up with upstream to clean up environment variable handling
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 772b3667c4..af21eae42a 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -1062,7 +1062,6 @@ class RunQueueExecute: | |||
1062 | # We need to setup the environment BEFORE the fork, since | 1062 | # We need to setup the environment BEFORE the fork, since |
1063 | # a fork() or exec*() activates PSEUDO... | 1063 | # a fork() or exec*() activates PSEUDO... |
1064 | 1064 | ||
1065 | env = {} | ||
1066 | envbackup = {} | 1065 | envbackup = {} |
1067 | 1066 | ||
1068 | taskdep = self.rqdata.dataCache.task_deps[fn] | 1067 | taskdep = self.rqdata.dataCache.task_deps[fn] |
@@ -1071,7 +1070,6 @@ class RunQueueExecute: | |||
1071 | for key, value in (var.split('=') for var in envvars): | 1070 | for key, value in (var.split('=') for var in envvars): |
1072 | envbackup[key] = os.environ.get(key) | 1071 | envbackup[key] = os.environ.get(key) |
1073 | os.environ[key] = value | 1072 | os.environ[key] = value |
1074 | env[key] = value | ||
1075 | 1073 | ||
1076 | fakedirs = (self.rqdata.dataCache.fakerootdirs[fn] or "").split() | 1074 | fakedirs = (self.rqdata.dataCache.fakerootdirs[fn] or "").split() |
1077 | for p in fakedirs: | 1075 | for p in fakedirs: |
@@ -1118,14 +1116,7 @@ class RunQueueExecute: | |||
1118 | for h in self.rqdata.hash_deps: | 1116 | for h in self.rqdata.hash_deps: |
1119 | the_data.setVar("BBHASHDEPS_%s" % h, self.rqdata.hash_deps[h]) | 1117 | the_data.setVar("BBHASHDEPS_%s" % h, self.rqdata.hash_deps[h]) |
1120 | 1118 | ||
1121 | env2 = bb.data.export_vars(the_data) | 1119 | os.environ.update(bb.data.exported_vars(the_data)) |
1122 | env2 = bb.data.export_envvars(env2, the_data) | ||
1123 | for e in os.environ: | ||
1124 | os.unsetenv(e) | ||
1125 | for e in env2: | ||
1126 | os.putenv(e, env2[e]) | ||
1127 | for e in env: | ||
1128 | os.putenv(e, env[e]) | ||
1129 | 1120 | ||
1130 | if quieterrors: | 1121 | if quieterrors: |
1131 | the_data.setVarFlag(taskname, "quieterrors", "1") | 1122 | the_data.setVarFlag(taskname, "quieterrors", "1") |