diff options
Diffstat (limited to 'pym')
-rw-r--r-- | pym/_emerge/__init__.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 8649912ae..bf4ef3afd 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1594,15 +1594,22 @@ class CompositeTask(AsynchronousTask): Assumes that task is the final task of this composite task. Calls _default_exit() and sets self.returncode to the task's returncode and sets self._current_task to None. - - Subclasses can use this as a generic final task exit callback. - """ self._default_exit(task) self._current_task = None self.returncode = task.returncode return self.returncode + def _default_final_exit(self, task): + """ + This calls _final_exit() and then wait(). + + Subclasses can use this as a generic final task exit callback. + + """ + self._final_exit(task) + return self.wait() + def _start_task(self, task, exit_handler): """ Register exit handler for the given task, set it @@ -2155,7 +2162,7 @@ class EbuildExecuter(CompositeTask): pkg=pkg, phase=phase, scheduler=scheduler, settings=settings, tree=tree)) - self._start_task(ebuild_phases, self._final_exit) + self._start_task(ebuild_phases, self._default_final_exit) class EbuildPhase(SubProcess): @@ -2872,7 +2879,6 @@ class MergeListItem(CompositeTask): self._install_task = build self._start_task(build, self._ebuild_exit) - self.wait() return elif pkg.type_name == "binary": @@ -2884,8 +2890,7 @@ class MergeListItem(CompositeTask): scheduler=scheduler, world_atom=world_atom) self._install_task = binpkg - self._start_task(binpkg, self._final_exit) - self.wait() + self._start_task(binpkg, self._default_final_exit) return def _ebuild_exit(self, build): |