diff options
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index b4134f826..37e1ac06b 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -1076,7 +1076,10 @@ class RunQueueExecute: env['PATH'] = self.cooker.configuration.initial_path envbackup = os.environ.copy() - os.environ = env + for e in envbackup: + os.unsetenv(e) + for e in env: + os.putenv(e, env[e]) sys.stdout.flush() sys.stderr.flush() @@ -1128,7 +1131,10 @@ class RunQueueExecute: except: os._exit(1) - os.environ = envbackup + for e in env: + os.unsetenv(e) + for e in envbackup: + os.putenv(e, envbackup[e]) return pid, pipein, pipeout |