summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/__init__.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index c382cc801..14c146665 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -8654,7 +8654,8 @@ class Scheduler(PollScheduler):
def _merge_exit(self, merge):
self._do_merge_exit(merge)
- self._job_exit(merge.merge)
+ self._deallocate_config(merge.merge.settings)
+ self._schedule()
def _do_merge_exit(self, merge):
pkg = merge.merge.pkg
@@ -8691,19 +8692,15 @@ class Scheduler(PollScheduler):
merge = PackageMerge(merge=build)
merge.addExitListener(self._merge_exit)
self._task_queues.merge.add(merge)
- self._task_queues.merge.schedule()
else:
self._failed_pkgs.append((build.pkg, build.returncode))
- self._job_exit(build)
+ self._deallocate_config(build.settings)
+ self._jobs -= 1
+ self._schedule()
def _extract_exit(self, build):
self._build_exit(build)
- def _job_exit(self, job):
- self._jobs -= 1
- self._deallocate_config(job.settings)
- self._schedule()
-
def _merge(self):
self._add_prefetchers()
@@ -8827,15 +8824,16 @@ class Scheduler(PollScheduler):
task = self._task(pkg, background)
- self._jobs += 1
if pkg.installed:
merge = PackageMerge(merge=task)
merge.addExitListener(self._merge_exit)
task_queues.merge.add(merge)
elif pkg.built:
+ self._jobs += 1
task.addExitListener(self._extract_exit)
task_queues.jobs.add(task)
else:
+ self._jobs += 1
task.addExitListener(self._build_exit)
task_queues.jobs.add(task)
return True