When in --nodeps mode, make Scheduler._set_digraph() discard the digraph and
authorZac Medico <zmedico@gentoo.org>
Tue, 11 Nov 2008 05:01:58 +0000 (05:01 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 11 Nov 2008 05:01:58 +0000 (05:01 -0000)
make Scheduler._choose_pkg() always return the task at the front of the queue.

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

pym/_emerge/__init__.py

index f9304dd72b2319a86fb366114d865a7970f7b6db..7ef69a969016e6ba22f4a5acc96247f2676fbb82 100644 (file)
@@ -9269,8 +9269,8 @@ class Scheduler(PollScheduler):
                return interactive_tasks
 
        def _set_digraph(self, digraph):
-               if self._max_jobs is not True and \
-                       self._max_jobs < 2:
+               if "--nodeps" in self.myopts or \
+                       (self._max_jobs is not True and self._max_jobs < 2):
                        # save some memory
                        self._digraph = None
                        return
@@ -9908,7 +9908,8 @@ class Scheduler(PollScheduler):
                        return None
 
                if self._digraph is None:
-                       if self._jobs or self._task_queues.merge:
+                       if (self._jobs or self._task_queues.merge) and \
+                               "--nodeps" not in self.myopts:
                                self._choose_pkg_return_early = True
                                return None
                        return self._pkg_queue.pop(0)