summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-07-19 15:09:38 +0000
committerZac Medico <zmedico@gentoo.org>2008-07-19 15:09:38 +0000
commit637f63d0fe6bee8035a51ed680393316c23699e4 (patch)
tree16b4465e9299c980feb9aeb36ced0ce581697cc7
parentfd9b18029bb1516e45f4c66cd25fe247dc76007e (diff)
downloadportage-637f63d0fe6bee8035a51ed680393316c23699e4.tar.gz
portage-637f63d0fe6bee8035a51ed680393316c23699e4.tar.bz2
portage-637f63d0fe6bee8035a51ed680393316c23699e4.zip
Merge tasks currently run synchronously which makes it necessary to disable
auto_schedule on the merge queue in order to avoid excess recursion which prevents tasks from being marked complete as soon as they should be. svn path=/main/trunk/; revision=11143
-rw-r--r--pym/_emerge/__init__.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 8c9831dab..f1a07e264 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -8701,6 +8701,12 @@ class Scheduler(PollScheduler):
setattr(self._task_queues, k,
SequentialTaskQueue(auto_schedule=True))
+ # Merge tasks currently run synchronously which makes
+ # it necessary to disable auto_schedule in order to
+ # avoid excess recursion which prevents tasks from
+ # being marked complete as soon as they should be.
+ self._task_queues.merge.auto_schedule = False
+
self._prefetchers = weakref.WeakValueDictionary()
self._pkg_queue = []
self._completed_tasks = set()
@@ -9274,11 +9280,11 @@ class Scheduler(PollScheduler):
def _merge_exit(self, merge):
self._do_merge_exit(merge)
self._deallocate_config(merge.merge.settings)
- self._schedule()
if merge.returncode == os.EX_OK and \
not merge.merge.pkg.installed:
self._status_display.curval += 1
self._status_display.merges = len(self._task_queues.merge)
+ self._schedule()
def _do_merge_exit(self, merge):
pkg = merge.merge.pkg
@@ -9446,6 +9452,7 @@ class Scheduler(PollScheduler):
def _schedule_tasks(self):
remaining, state_change = self._schedule_tasks_imp()
+ self._task_queues.merge.schedule()
self._status_display.display()
return remaining