From dc6f1843c745950b91a9bb64f5668de24f4cd08d Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 7 Jul 2008 23:32:11 +0000 Subject: [PATCH] Add a Scheduler._digraph attribute for use in parallel build scheduling. svn path=/main/trunk/; revision=10976 --- pym/_emerge/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 48e5ca6f2..3c94d61f2 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -7610,6 +7610,7 @@ class Scheduler(object): self._pkg_count = self._pkg_count_class( curval=0, maxval=merge_count) self._max_jobs = 1 + self._set_digraph(digraph) self._jobs = 0 features = self.settings.features @@ -7635,6 +7636,13 @@ class Scheduler(object): except EnvironmentError: pass + def _set_digraph(self, digraph): + if self._max_jobs < 2: + # save some memory + self._digraph = None + else: + self._digraph = digraph + class _pkg_failure(portage.exception.PortageException): """ An instance of this class is raised by unmerge() when @@ -8103,6 +8111,8 @@ class Scheduler(object): mylist = mydepgraph.altlist() mydepgraph.break_refs(mylist) mydepgraph.break_refs(dropped_tasks) + mydepgraph.break_refs(mydepgraph.digraph.order) + self._set_digraph(mydepgraph.digraph) return (mylist, dropped_tasks) def _show_list(self): -- 2.26.2