Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Zac Medico (zmedico)" <zmedico@g.o>
Subject: portage r9880 - main/branches/2.1.2/bin
Date: Sun, 13 Apr 2008 23:21:14 +0000
Author: zmedico
Date: 2008-04-13 23:21:13 +0000 (Sun, 13 Apr 2008)
New Revision: 9880

Modified:
   main/branches/2.1.2/bin/emerge
Log:
* For optimal atom selection, use PackageVirtualDbapi instances in place
  of the vardb for all dep_check() calls.
* Replace dep_check_trees in depgraph.validate_blockers() with the
  equivalent self._graph_trees reference.
(trunk r9879)


Modified: main/branches/2.1.2/bin/emerge
===================================================================
--- main/branches/2.1.2/bin/emerge	2008-04-13 23:18:54 UTC (rev 9879)
+++ main/branches/2.1.2/bin/emerge	2008-04-13 23:21:13 UTC (rev 9880)
@@ -1738,15 +1738,13 @@
 				pass
 			graph_tree.dbapi = fakedb
 			self._graph_trees[myroot] = {}
-			self._graph_trees[myroot]["porttree"] = graph_tree
-			self._graph_trees[myroot]["vartree"] = self.trees[myroot]["vartree"]
-			del vardb, fakedb
 			self._filtered_trees[myroot] = {}
 			# Substitute the graph tree for the vartree in dep_check() since we
 			# want atom selections to be consistent with package selections
 			# have already been made.
-			self._filtered_trees[myroot]["vartree"] = \
-				self._graph_trees[myroot]["porttree"]
+			self._graph_trees[myroot]["porttree"]   = graph_tree
+			self._graph_trees[myroot]["vartree"]    = graph_tree
+			self._filtered_trees[myroot]["vartree"] = graph_tree
 			def filtered_tree():
 				pass
 			filtered_tree.dbapi = self._dep_check_composite_db(self, myroot)
@@ -3116,18 +3114,6 @@
 			# due to the performance penalty that is incurred by all the
 			# additional dep_check calls that are required.
 
-			# Optimization hack for dep_check calls that minimizes the
-			# available matches by replacing the portdb with a fakedbapi
-			# instance.
-			class FakePortageTree(object):
-				def __init__(self, mydb):
-					self.dbapi = mydb
-			dep_check_trees = {}
-			for myroot in self.trees:
-				dep_check_trees[myroot] = self.trees[myroot].copy()
-				dep_check_trees[myroot]["porttree"] = \
-					FakePortageTree(self.mydbapi[myroot])
-
 			dep_keys = ["DEPEND","RDEPEND","PDEPEND"]
 			for myroot in self.trees:
 				vardb = self.trees[myroot]["vartree"].dbapi
@@ -3163,7 +3149,7 @@
 							try:
 								success, atoms = portage.dep_check(depstr,
 									final_db, pkgsettings, myuse=myuse,
-									trees=dep_check_trees, myroot=myroot)
+									trees=self._graph_trees, myroot=myroot)
 							except Exception, e:
 								if isinstance(e, SystemExit):
 									raise

-- 
gentoo-commits@g.o mailing list


Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
portage r9879 - main/trunk/pym/_emerge
Next by thread:
gentoo-x86 commit in sys-devel/automake/files: automake-1.10.1-tests.patch
Previous by date:
portage r9879 - main/trunk/pym/_emerge
Next by date:
gentoo-x86 commit in sys-devel/automake: ChangeLog automake-1.10.1.ebuild


Updated Apr 29, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.