From b7c8c3fc46f1953853549d2a5abfcf66b575abc4 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 12 Dec 2006 01:47:23 +0000 Subject: [PATCH] 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 --- bin/emerge | 11 +++++++---- 1 file 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: -- 2.26.2