Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9880 - main/branches/2.1.2/bin
Date: Sun, 13 Apr 2008 23:21:17
Message-Id: E1JlBVa-0001uS-NP@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-04-13 23:21:13 +0000 (Sun, 13 Apr 2008)
3 New Revision: 9880
4
5 Modified:
6 main/branches/2.1.2/bin/emerge
7 Log:
8 * For optimal atom selection, use PackageVirtualDbapi instances in place
9 of the vardb for all dep_check() calls.
10 * Replace dep_check_trees in depgraph.validate_blockers() with the
11 equivalent self._graph_trees reference.
12 (trunk r9879)
13
14
15 Modified: main/branches/2.1.2/bin/emerge
16 ===================================================================
17 --- main/branches/2.1.2/bin/emerge 2008-04-13 23:18:54 UTC (rev 9879)
18 +++ main/branches/2.1.2/bin/emerge 2008-04-13 23:21:13 UTC (rev 9880)
19 @@ -1738,15 +1738,13 @@
20 pass
21 graph_tree.dbapi = fakedb
22 self._graph_trees[myroot] = {}
23 - self._graph_trees[myroot]["porttree"] = graph_tree
24 - self._graph_trees[myroot]["vartree"] = self.trees[myroot]["vartree"]
25 - del vardb, fakedb
26 self._filtered_trees[myroot] = {}
27 # Substitute the graph tree for the vartree in dep_check() since we
28 # want atom selections to be consistent with package selections
29 # have already been made.
30 - self._filtered_trees[myroot]["vartree"] = \
31 - self._graph_trees[myroot]["porttree"]
32 + self._graph_trees[myroot]["porttree"] = graph_tree
33 + self._graph_trees[myroot]["vartree"] = graph_tree
34 + self._filtered_trees[myroot]["vartree"] = graph_tree
35 def filtered_tree():
36 pass
37 filtered_tree.dbapi = self._dep_check_composite_db(self, myroot)
38 @@ -3116,18 +3114,6 @@
39 # due to the performance penalty that is incurred by all the
40 # additional dep_check calls that are required.
41
42 - # Optimization hack for dep_check calls that minimizes the
43 - # available matches by replacing the portdb with a fakedbapi
44 - # instance.
45 - class FakePortageTree(object):
46 - def __init__(self, mydb):
47 - self.dbapi = mydb
48 - dep_check_trees = {}
49 - for myroot in self.trees:
50 - dep_check_trees[myroot] = self.trees[myroot].copy()
51 - dep_check_trees[myroot]["porttree"] = \
52 - FakePortageTree(self.mydbapi[myroot])
53 -
54 dep_keys = ["DEPEND","RDEPEND","PDEPEND"]
55 for myroot in self.trees:
56 vardb = self.trees[myroot]["vartree"].dbapi
57 @@ -3163,7 +3149,7 @@
58 try:
59 success, atoms = portage.dep_check(depstr,
60 final_db, pkgsettings, myuse=myuse,
61 - trees=dep_check_trees, myroot=myroot)
62 + trees=self._graph_trees, myroot=myroot)
63 except Exception, e:
64 if isinstance(e, SystemExit):
65 raise
66
67 --
68 gentoo-commits@l.g.o mailing list