summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-12 01:47:23 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-12 01:47:23 +0000
commitb7c8c3fc46f1953853549d2a5abfcf66b575abc4 (patch)
tree4f8e12d88fa7e0baf7ada468b2c549cd1a76e8db
parent4c9454a95eb69da45fd7688d03739a6df49d600e (diff)
downloadportage-b7c8c3fc46f1953853549d2a5abfcf66b575abc4.tar.gz
portage-b7c8c3fc46f1953853549d2a5abfcf66b575abc4.tar.bz2
portage-b7c8c3fc46f1953853549d2a5abfcf66b575abc4.zip
Store dependency metadata in depgraph.mydbapi so that it can be used in place of the portdb for optimized dep_check calls in depgraph.validate_blockers().
svn path=/main/trunk/; revision=5276
-rwxr-xr-xbin/emerge11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/emerge b/bin/emerge
index 4393e4f4b..ac569b9b1 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -804,6 +804,7 @@ class depgraph:
self.pkgsettings = {}
self.pkg_node_map = {}
self.mydbapi = {}
+ self._mydbapi_keys = ["SLOT", "DEPEND", "RDEPEND", "PDEPEND"]
self.useFlags = {}
self.trees = {}
for myroot in trees:
@@ -822,8 +823,9 @@ class depgraph:
fakedb = portage.fakedbapi(settings=self.pkgsettings[myroot])
self.mydbapi[myroot] = fakedb
for pkg in vardb.cpv_all():
- myslot = vardb.aux_get(pkg, ["SLOT"])[0]
- fakedb.cpv_inject(pkg, metadata={"SLOT":myslot})
+ fakedb.cpv_inject(pkg,
+ metadata=dict(izip(self._mydbapi_keys,
+ vardb.aux_get(pkg, self._mydbapi_keys))))
del vardb, fakedb
self.useFlags[myroot] = {}
if "--usepkg" in self.myopts:
@@ -960,8 +962,9 @@ class depgraph:
priority=priority)
if addme:
- myslot = mydbapi.aux_get(mykey, ["SLOT"])[0]
- self.mydbapi[myroot].cpv_inject(mykey, metadata={"SLOT":myslot})
+ self.mydbapi[myroot].cpv_inject(mykey,
+ metadata=dict(izip(self._mydbapi_keys,
+ mydbapi.aux_get(mykey, self._mydbapi_keys))))
""" This section determines whether we go deeper into dependencies or not.
We want to go deeper on a few occasions: