From: Zac Medico Date: Sun, 10 Dec 2006 10:35:47 +0000 (-0000) Subject: For bug #128809, optimize dep_check calls and enable the blocker detection by default... X-Git-Tag: v2.1.2~329 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f1107bff7d0360f6c1301482032b82a2ab6d7499;p=portage.git For bug #128809, optimize dep_check calls and enable the blocker detection by default since the performance now seems acceptable. svn path=/main/trunk/; revision=5255 --- diff --git a/bin/emerge b/bin/emerge index aa18f1386..ed03d6cf3 100755 --- a/bin/emerge +++ b/bin/emerge @@ -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: