Make sure PORTAGE_IPC_DAEMON is only in the environment for
authorZac Medico <zmedico@gentoo.org>
Sat, 14 Aug 2010 07:58:25 +0000 (00:58 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 14 Aug 2010 07:58:25 +0000 (00:58 -0700)
appropriate phases (it was leaking into clean/cleanrm from
previous phases.

pym/_emerge/AbstractEbuildProcess.py

index 964095b2a876e464b1a1b9da0d31e8f48967145d..138430670572f313ff591c75767532e803013bf4 100644 (file)
@@ -33,10 +33,10 @@ class AbstractEbuildProcess(SpawnProcess):
 
        def _start(self):
 
+               envs = [self.settings]
+               if self.env is not None:
+                       envs.append(self.env)
                if self._get_phase() not in self._phases_without_builddir:
-                       envs = [self.settings]
-                       if self.env is not None:
-                               envs.append(self.env)
                        for env in envs:
                                env['PORTAGE_IPC_DAEMON'] = "1"
                        self._exit_command = ExitCommand()
@@ -56,6 +56,9 @@ class AbstractEbuildProcess(SpawnProcess):
                                output_fifo=output_fifo,
                                scheduler=self.scheduler)
                        self._ipc_daemon.start()
+               else:
+                       for env in envs:
+                               env.pop('PORTAGE_IPC_DAEMON', None)
 
                SpawnProcess._start(self)