For bug #128809, optimize dep_check calls and enable the blocker detection by default...
authorZac Medico <zmedico@gentoo.org>
Sun, 10 Dec 2006 10:35:47 +0000 (10:35 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 10 Dec 2006 10:35:47 +0000 (10:35 -0000)
svn path=/main/trunk/; revision=5255

bin/emerge

index aa18f138628278206b31ca0dabe7769c26f9ab7c..ed03d6cf3d312949ceca33ee2d286218fb5482ca 100755 (executable)
@@ -1438,7 +1438,8 @@ class depgraph:
                correct merge order such that mutually blocking packages are never
                installed simultaneously."""
 
-               if "deep" in self.myparams:
+               #if "deep" in self.myparams:
+               if True:
                        # Pull in blockers from all installed packages that haven't already
                        # been pulled into the depgraph.  This is not enabled by default
                        # due to the performance penalty that is incurred by all the
@@ -1449,6 +1450,7 @@ class depgraph:
                                vardb = self.trees[myroot]["vartree"].dbapi
                                portdb = self.trees[myroot]["porttree"].dbapi
                                pkgsettings = self.pkgsettings[myroot]
+                               final_db = self.mydbapi[myroot]
                                for pkg in self.trees[myroot]["vartree"].dbapi.cpv_all():
                                        blocker_atoms = None
                                        matching_node = pkg_node_map.get(pkg, None)
@@ -1470,7 +1472,10 @@ class depgraph:
                                                        ptype = "installed"
                                                myuse = vardb.aux_get(pkg, ["USE"])[0]
                                                depstr = " ".join(dep_vals)
-                                               success, atoms = portage.dep_check(depstr, None,
+                                               # It is crucial to pass in final_db here in order to
+                                               # optimize dep_check calls by eliminating atoms via
+                                               # dep_wordreduce and dep_eval calls.
+                                               success, atoms = portage.dep_check(depstr, final_db,
                                                        pkgsettings, myuse=myuse, trees=self.trees,
                                                        myroot=myroot)
                                                if not success: