summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-07-19 13:56:54 +0000
committerZac Medico <zmedico@gentoo.org>2008-07-19 13:56:54 +0000
commitfd9b18029bb1516e45f4c66cd25fe247dc76007e (patch)
tree84f0932a5bb98b98ec5a13ec90a0f0677e98918b
parentb897e4d00f69ac16554a5c554da9735c4ceb9435 (diff)
downloadportage-fd9b18029bb1516e45f4c66cd25fe247dc76007e.tar.gz
portage-fd9b18029bb1516e45f4c66cd25fe247dc76007e.tar.bz2
portage-fd9b18029bb1516e45f4c66cd25fe247dc76007e.zip
Fix Scheduler._schedule_tasks_imp() so that it never indicates that there
are remaining tasks in cases when it's supposed to bail out due to a package failure. svn path=/main/trunk/; revision=11142
-rw-r--r--pym/_emerge/__init__.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index a9d9c9179..8c9831dab 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -9460,12 +9460,15 @@ class Scheduler(PollScheduler):
state_change = 0
- while not self._choose_pkg_return_early and \
- self._can_add_job():
+ while True:
if not self._pkg_queue or self._failed_pkgs:
return (False, state_change)
+ if self._choose_pkg_return_early or \
+ not self._can_add_job():
+ return (True, state_change)
+
pkg = self._choose_pkg()
if pkg is None:
return (True, state_change)