From dae3abf73f6d9099f3e3f6c2553190f401e154e3 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 10 Oct 2007 02:03:45 +0000 Subject: [PATCH] Initialize the list of package repos inside the depgraph constructor so it's always available. svn path=/main/trunk/; revision=8034 --- pym/emerge/__init__.py | 33 ++++++++++++++++----------------- 1 file 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() -- 2.26.2