diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-12-06 11:03:54 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-12-06 11:03:54 +0000 |
commit | 72aba76bde1fe1e79c35d0c80c79ac16a1db0639 (patch) | |
tree | 231b2876ab96022876f6d6c3e185a42611ef29a4 /pym/_emerge/Scheduler.py | |
parent | 07aa28581d9153a49e33661830d4929a94d59176 (diff) | |
download | portage-72aba76bde1fe1e79c35d0c80c79ac16a1db0639.tar.gz portage-72aba76bde1fe1e79c35d0c80c79ac16a1db0639.tar.bz2 portage-72aba76bde1fe1e79c35d0c80c79ac16a1db0639.zip |
Bug #295715 - Implement a register_success_hook function to complement
register_die_hook, and also add code to ensure the die hooks are called even
when the failure is on the python side (like for file collisions).
(trunk r14936)
svn path=/main/branches/2.1.7/; revision=14950
Diffstat (limited to 'pym/_emerge/Scheduler.py')
-rw-r--r-- | pym/_emerge/Scheduler.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index 6542822f4..633539c64 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -40,6 +40,7 @@ from _emerge._find_deep_system_runtime_deps import _find_deep_system_runtime_dep from _emerge._flush_elog_mod_echo import _flush_elog_mod_echo from _emerge.JobStatusDisplay import JobStatusDisplay from _emerge.MergeListItem import MergeListItem +from _emerge.MiscFunctionsProcess import MiscFunctionsProcess from _emerge.Package import Package from _emerge.PackageMerge import PackageMerge from _emerge.PollScheduler import PollScheduler @@ -543,9 +544,14 @@ class Scheduler(PollScheduler): background = self._background log_path = settings.get("PORTAGE_LOG_FILE") - ebuild_phase = EbuildPhase(background=background, - pkg=pkg, phase=phase, scheduler=scheduler, - settings=settings, tree=pkg_dblink.treetype) + if phase in ('die_hooks', 'success_hooks'): + ebuild_phase = MiscFunctionsProcess(background=background, + commands=[phase], phase=phase, pkg=pkg, + scheduler=scheduler, settings=settings) + else: + ebuild_phase = EbuildPhase(background=background, + pkg=pkg, phase=phase, scheduler=scheduler, + settings=settings, tree=pkg_dblink.treetype) ebuild_phase.start() ebuild_phase.wait() |