Fix Scheduler._schedule_tasks_imp() so that it never indicates that there
authorZac Medico <zmedico@gentoo.org>
Sat, 19 Jul 2008 13:56:54 +0000 (13:56 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 19 Jul 2008 13:56:54 +0000 (13:56 -0000)
are remaining tasks in cases when it's supposed to bail out due to a
package failure.

svn path=/main/trunk/; revision=11142

pym/_emerge/__init__.py

index a9d9c917914d59adf9c6537b3ab97013f8155784..8c9831dab069c27bb5aa513b39e1ad4b04e64c94 100644 (file)
@@ -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)