summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-09 00:58:53 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-09 00:58:53 +0000
commit4136ecdcf046becc12015163ead625ed173acbc9 (patch)
treeaacd15495bb1a7ef3476ff64fd24d4c770c8ab71
parent6a06177f04ab2c5bb02c8cc98b098f478585a65c (diff)
downloadportage-4136ecdcf046becc12015163ead625ed173acbc9.tar.gz
portage-4136ecdcf046becc12015163ead625ed173acbc9.tar.bz2
portage-4136ecdcf046becc12015163ead625ed173acbc9.zip
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
-rwxr-xr-xbin/emerge27
1 files 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)