From 4136ecdcf046becc12015163ead625ed173acbc9 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 9 Dec 2006 00:58:53 +0000 Subject: [PATCH] Go ahead and populate depgraph.mydbapi even when --emptytree is enabled since it doesn't matter anymore (dep_check now returns all deps anyway). svn path=/main/trunk/; revision=5231 --- bin/emerge | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/bin/emerge b/bin/emerge index 94aef2e7c..7dd017cb0 100755 --- a/bin/emerge +++ b/bin/emerge @@ -751,6 +751,7 @@ class depgraph: self.spinner = spinner self.pkgsettings = {} self.pkg_node_map = {} + self.mydbapi = {} self.trees = {} for myroot in trees: self.trees[myroot] = {} @@ -761,6 +762,15 @@ class depgraph: self.pkgsettings[myroot] = portage.config( clone=self.trees[myroot]["vartree"].settings) self.pkg_node_map[myroot] = {} + vardb = self.trees[myroot]["vartree"].dbapi + # This fakedbapi instance will model the state that the vdb will + # have after new packages have been installed. + 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}) + del vardb, fakedb del trees self.useFlags = {} self.useFlags[self.target_root] = {} @@ -771,23 +781,6 @@ class depgraph: self.digraph=portage.digraph() self.orderedkeys=[] self.outdatedpackages=[] - self.mydbapi={} - self.mydbapi["/"] = portage.fakedbapi(settings=settings) - vardb = self.trees["/"]["vartree"].dbapi - fakedb = self.mydbapi["/"] - if "empty" not in self.myparams or self.target_root != "/": - for pkg in vardb.cpv_all(): - myslot = vardb.aux_get(pkg, ["SLOT"])[0] - fakedb.cpv_inject(pkg, metadata={"SLOT":myslot}) - if self.target_root != "/": - self.mydbapi[self.target_root] = \ - portage.fakedbapi(settings=settings) - vardb = self.trees[self.target_root]["vartree"].dbapi - fakedb = self.mydbapi[self.target_root] - if "empty" not in self.myparams: - for pkg in vardb.cpv_all(): - myslot = vardb.aux_get(pkg, ["SLOT"])[0] - fakedb.cpv_inject(pkg, metadata={"SLOT":myslot}) if "--usepkg" in self.myopts: self.trees["/"]["bintree"].populate( "--getbinpkg" in self.myopts, "--getbinpkgonly" in self.myopts) -- 2.26.2