From: Zac Medico Date: Tue, 8 Jul 2008 23:42:28 +0000 (-0000) Subject: * Fix _choose_pkg() to pop the first node if there are no other jobs running. X-Git-Tag: v2.2_rc2~147 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=75b5780fc77b82db648cb72ac1074088d4e2f48e;p=portage.git * Fix _choose_pkg() to pop the first node if there are no other jobs running. * Allow _choose_pkg() to choose an uninstall node when it reaches the front of the queue. TODO: fix order for uninstall operations. * Fix _dependent_on_scheduled_merges() to handle direct circular deps correctly. svn path=/main/trunk/; revision=10994 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 807c3342a..8ef659ab5 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -8102,7 +8102,11 @@ class Scheduler(object): return rval def _choose_pkg(self): - if self._max_jobs < 2: + """ + TODO: fix order for uninstall operations + """ + if self._max_jobs < 2 or self._jobs == 0 or \ + self._pkg_queue[0].operation == "uninstall": return self._pkg_queue.pop(0) self._prune_digraph() @@ -8131,7 +8135,7 @@ class Scheduler(object): completed_tasks = self._completed_tasks dependent = False - traversed_nodes = set() + traversed_nodes = set([pkg]) node_stack = graph.child_nodes(pkg) while node_stack: node = node_stack.pop()