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:
- for env in envs:
- env['PORTAGE_IPC_DAEMON'] = "1"
+ self.settings['PORTAGE_IPC_DAEMON'] = "1"
self._exit_command = ExitCommand()
self._exit_command.reply_hook = self._exit_command_callback
input_fifo = os.path.join(
scheduler=self.scheduler)
self._ipc_daemon.start()
else:
- for env in envs:
- env.pop('PORTAGE_IPC_DAEMON', None)
+ self.settings.pop('PORTAGE_IPC_DAEMON', None)
SpawnProcess._start(self)
1. The return code of the spawned process.
"""
- if isinstance(mysettings, dict):
- env=mysettings
- keywords["opt_name"]="[ %s ]" % "portage"
- else:
- check_config_instance(mysettings)
- env=mysettings.environ()
- if mysettings.mycpv is not None:
- keywords["opt_name"] = "[%s]" % mysettings.mycpv
- else:
- keywords["opt_name"] = "[%s/%s]" % \
- (mysettings.get("CATEGORY",""), mysettings.get("PF",""))
+ check_config_instance(mysettings)
fd_pipes = keywords.get("fd_pipes")
if fd_pipes is None:
if not free and not (fakeroot or portage.process.sandbox_capable):
free = True
+ if mysettings.mycpv is not None:
+ keywords["opt_name"] = "[%s]" % mysettings.mycpv
+ else:
+ keywords["opt_name"] = "[%s/%s]" % \
+ (mysettings.get("CATEGORY",""), mysettings.get("PF",""))
+
if free or "SANDBOX_ACTIVE" in os.environ:
keywords["opt_name"] += " bash"
spawn_func = portage.process.spawn_bash
mysettings["PORTAGE_SANDBOX_T"])
if keywords.get("returnpid"):
- return spawn_func(mystring, env=env, **keywords)
+ return spawn_func(mystring, env=mysettings.environ(), **keywords)
sched = TaskScheduler()
proc = EbuildSpawnProcess(
- background=False,
- args=mystring, env=env,
+ background=False, args=mystring,
scheduler=sched.sched_iface, spawn_func=spawn_func,
settings=mysettings, **keywords)