summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-10 10:35:47 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-10 10:35:47 +0000
commitf1107bff7d0360f6c1301482032b82a2ab6d7499 (patch)
tree77ea8a946042894d400ee4ec24ecc0902aa79970
parentb918b621bc0f4068981fa5f73114db21adaf775c (diff)
downloadportage-f1107bff7d0360f6c1301482032b82a2ab6d7499.tar.gz
portage-f1107bff7d0360f6c1301482032b82a2ab6d7499.tar.bz2
portage-f1107bff7d0360f6c1301482032b82a2ab6d7499.zip
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
-rwxr-xr-xbin/emerge9
1 files changed, 7 insertions, 2 deletions
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: