'portage.elog:elog_process',
'portage.locks:lockdir,unlockdir',
'portage.output:bold,colorize',
- 'portage.package.ebuild.doebuild:doebuild,doebuild_environment,' + \
- '_spawn_misc_sh',
+ 'portage.package.ebuild.doebuild:doebuild,doebuild_environment',
'portage.package.ebuild.prepare_build_dirs:prepare_build_dirs',
'portage.update:fixdbentries',
'portage.util:apply_secpass_permissions,ConfigProtect,ensure_dirs,' + \
from portage import _unicode_encode
from portage.cache.mappings import slot_dict_class
+from _emerge.TaskScheduler import TaskScheduler
+from _emerge.MiscFunctionsProcess import MiscFunctionsProcess
import codecs
import gc
phase = 'die_hooks'
if self._scheduler is None:
- _spawn_misc_sh(self.settings, [phase],
- phase=phase)
+ task_scheduler = TaskScheduler()
+ ebuild_phase = MiscFunctionsProcess(
+ background=False,
+ commands=[phase],
+ scheduler=task_scheduler.sched_iface,
+ settings=self.settings)
+ task_scheduler.add(ebuild_phase)
+ task_scheduler.run()
else:
self._scheduler.dblinkEbuildPhase(
self, mydbapi, myebuild, phase)
myargs = [_shell_quote(misc_sh_binary)] + _post_phase_cmds["postinst"]
return myargs
-
-def _spawn_misc_sh(mysettings, commands, phase=None, **kwargs):
- """
- @param mysettings: the ebuild config
- @type mysettings: config
- @param commands: a list of function names to call in misc-functions.sh
- @type commands: list
- @rtype: int
- @returns: the return value from the spawn() call
- """
-
- # Note: PORTAGE_BIN_PATH may differ from the global
- # constant when portage is reinstalling itself.
- portage_bin_path = mysettings["PORTAGE_BIN_PATH"]
- misc_sh_binary = os.path.join(portage_bin_path,
- os.path.basename(MISC_SH_BINARY))
- mycommand = " ".join([_shell_quote(misc_sh_binary)] + commands)
- debug = mysettings.get("PORTAGE_DEBUG") == "1"
- logfile = mysettings.get("PORTAGE_LOG_FILE")
- mysettings.pop("EBUILD_PHASE", None)
- try:
- rval = spawn(mycommand, mysettings, debug=debug,
- logfile=logfile, **kwargs)
- finally:
- pass
-
- return rval