From: Zac Medico Date: Mon, 7 Jul 2008 23:32:11 +0000 (-0000) Subject: Add a Scheduler._digraph attribute for use in parallel build scheduling. X-Git-Tag: v2.2_rc2~165 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dc6f1843c745950b91a9bb64f5668de24f4cd08d;p=portage.git Add a Scheduler._digraph attribute for use in parallel build scheduling. svn path=/main/trunk/; revision=10976 --- 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):