From 4f79b0df87934f110a7668a4eeb4c2897486af30 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 30 Jan 2008 20:03:44 +0000 Subject: Pass db_keys in to the FakeVartree constructor (merged from trunk). This solves an issue with EAPI missing from the key list which triggers invalid EAPI messages for masked packages in cases where there is an installed version and all ebuilds are masked. svn path=/main/branches/2.1.2/; revision=9234 --- bin/emerge | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/emerge b/bin/emerge index 122e87fd1..e54d8c7f6 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1031,9 +1031,13 @@ class FakeVartree(portage.vartree): user doesn't necessarily need write access to the vardb in cases where global updates are necessary (updates are performed when necessary if there is not a matching ebuild in the tree).""" - def __init__(self, real_vartree, portdb): + def __init__(self, real_vartree, portdb, db_keys): self.root = real_vartree.root self.settings = real_vartree.settings + mykeys = db_keys[:] + for required_key in ("COUNTER", "SLOT"): + if required_key not in mykeys: + mykeys.append(required_key) self.dbapi = portage.fakedbapi(settings=real_vartree.settings) vdb_path = os.path.join(self.root, portage.VDB_PATH) try: @@ -1045,8 +1049,6 @@ class FakeVartree(portage.vartree): try: if os.access(vdb_path, os.W_OK): vdb_lock = portage_locks.lockdir(vdb_path) - mykeys = ["SLOT", "COUNTER", "PROVIDE", "USE", "IUSE", - "RESTRICT", "DEPEND", "RDEPEND", "PDEPEND", "repository"] real_dbapi = real_vartree.dbapi slot_counters = {} for cpv in real_dbapi.cpv_all(): @@ -1324,7 +1326,8 @@ class depgraph: self.trees[myroot][tree] = trees[myroot][tree] self.trees[myroot]["vartree"] = \ FakeVartree(trees[myroot]["vartree"], - trees[myroot]["porttree"].dbapi) + trees[myroot]["porttree"].dbapi, + self._mydbapi_keys) self.pkgsettings[myroot] = portage.config( clone=self.trees[myroot]["vartree"].settings) self.pkg_node_map[myroot] = {} @@ -5709,7 +5712,9 @@ def action_depclean(settings, trees, ldpath_mtimes, dep_check_trees = {} dep_check_trees[myroot] = {} dep_check_trees[myroot]["vartree"] = \ - FakeVartree(trees[myroot]["vartree"], trees[myroot]["porttree"].dbapi) + FakeVartree(trees[myroot]["vartree"], + trees[myroot]["porttree"].dbapi. + depgraph._mydbapi_keys) vardb = dep_check_trees[myroot]["vartree"].dbapi # Constrain dependency selection to the installed packages. dep_check_trees[myroot]["porttree"] = dep_check_trees[myroot]["vartree"] -- cgit v1.2.3-1-g7c22