Pass the digraph into the MergeTask constructor. It's currently unused
authorZac Medico <zmedico@gentoo.org>
Fri, 27 Jun 2008 22:53:08 +0000 (22:53 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 27 Jun 2008 22:53:08 +0000 (22:53 -0000)
but it will be useful for parallel scheduling.

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

pym/_emerge/__init__.py

index bd579ce9b4db60795124ec54484b1f298d8ff8dc..6dc8d5abfed14506d7f6d5cad649d9fcf1f985d4 100644 (file)
@@ -5874,7 +5874,7 @@ class MergeTask(object):
                "--nodeps", "--pretend"])
 
        def __init__(self, settings, trees, mtimedb, myopts,
-               spinner, mergelist, favorites):
+               spinner, mergelist, favorites, digraph):
                self.settings = settings
                self.target_root = settings["ROOT"]
                self.trees = trees
@@ -8909,11 +8909,11 @@ def action_build(settings, trees, mtimedb,
                                time.sleep(3) # allow the parent to have first fetch
                        mymergelist = mydepgraph.altlist()
                        mydepgraph.break_refs(mymergelist)
+                       mergetask = MergeTask(settings, trees, mtimedb, myopts,
+                               spinner, mymergelist, favorites, mydepgraph.digraph)
                        del mydepgraph
                        clear_caches(trees)
 
-                       mergetask = MergeTask(settings, trees, mtimedb, myopts,
-                               spinner, mymergelist, favorites)
                        retval = mergetask.merge()
                        merge_count = mergetask.curval
                else:
@@ -8955,11 +8955,11 @@ def action_build(settings, trees, mtimedb,
                        pkglist = mydepgraph.altlist()
                        mydepgraph.saveNomergeFavorites()
                        mydepgraph.break_refs(pkglist)
+                       mergetask = MergeTask(settings, trees, mtimedb, myopts,
+                               spinner, pkglist, favorites, mydepgraph.digraph)
                        del mydepgraph
                        clear_caches(trees)
 
-                       mergetask = MergeTask(settings, trees, mtimedb, myopts,
-                               spinner, pkglist, favorites)
                        retval = mergetask.merge()
                        merge_count = mergetask.curval