summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-10 02:03:45 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-10 02:03:45 +0000
commitdae3abf73f6d9099f3e3f6c2553190f401e154e3 (patch)
treea27a916e6d87b290a0594f5c17f6ef61d0d8e186
parentb2b47aea87f1d17bcea196a7e00eb2828a3d3472 (diff)
downloadportage-dae3abf73f6d9099f3e3f6c2553190f401e154e3.tar.gz
portage-dae3abf73f6d9099f3e3f6c2553190f401e154e3.tar.bz2
portage-dae3abf73f6d9099f3e3f6c2553190f401e154e3.zip
Initialize the list of package repos inside the
depgraph constructor so it's always available. svn path=/main/trunk/; revision=8034
-rw-r--r--pym/emerge/__init__.py33
1 files changed, 16 insertions, 17 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index 09cac4a72..b63c20a9b 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -1141,6 +1141,21 @@ class depgraph(object):
settings=self.pkgsettings[myroot], exclusive_slots=False)
self._filtered_trees[myroot]["porttree"] = filtered_tree
self._filtered_trees[myroot]["atoms"] = set()
+ dbs = []
+ portdb = self.trees[myroot]["porttree"].dbapi
+ bindb = self.trees[myroot]["bintree"].dbapi
+ vardb = self.trees[myroot]["vartree"].dbapi
+ # (db, pkg_type, built, installed, db_keys)
+ if "--usepkgonly" not in self.myopts:
+ db_keys = list(portdb._aux_cache_keys)
+ dbs.append((portdb, "ebuild", False, False, db_keys))
+ if "--usepkg" in self.myopts:
+ db_keys = list(bindb._aux_cache_keys)
+ dbs.append((bindb, "binary", True, False, db_keys))
+ if "--usepkgonly" in self.myopts:
+ db_keys = self._mydbapi_keys
+ dbs.append((vardb, "installed", True, True, db_keys))
+ self._filtered_trees[myroot]["dbs"] = dbs
if "--usepkg" in self.myopts:
self.trees[myroot]["bintree"].populate(
"--getbinpkg" in self.myopts,
@@ -1757,23 +1772,7 @@ class depgraph(object):
portage.dep._dep_check_strict = True
filtered_atoms = self._filtered_trees[myroot]["atoms"]
- dbs = self._filtered_trees[myroot].get("dbs")
- if dbs is None:
- dbs = []
- portdb = self.trees[myroot]["porttree"].dbapi
- bindb = self.trees[myroot]["bintree"].dbapi
- vardb = self.trees[myroot]["vartree"].dbapi
- # (db, pkg_type, built, installed, db_keys)
- if "--usepkgonly" not in self.myopts:
- db_keys = list(portdb._aux_cache_keys)
- dbs.append((portdb, "ebuild", False, False, db_keys))
- if "--usepkg" in self.myopts:
- db_keys = list(bindb._aux_cache_keys)
- dbs.append((bindb, "binary", True, False, db_keys))
- if "--usepkgonly" in self.myopts:
- db_keys = self._mydbapi_keys
- dbs.append((vardb, "installed", True, True, db_keys))
- self._filtered_trees[myroot]["dbs"] = dbs
+ dbs = self._filtered_trees[myroot]["dbs"]
old_virts = pkgsettings.getvirtuals()
while atoms:
x = atoms.pop()