From: Zac Medico Date: Sun, 10 Aug 2008 01:48:13 +0000 (-0000) Subject: Remove INHERITED from the vardbapi aux_get cache since it's not really that X-Git-Tag: v2.2_rc7~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8c70bc853606fa4226d8c499c134fefe98781132;p=portage.git Remove INHERITED from the vardbapi aux_get cache since it's not really that useful (@live-rebuild currently pulls INHERITED from the highest visible ebuild). Also adjust keys used to pull metadata for Package instances, so that INHERITED won't get pulled from the vardbapi anymore. svn path=/main/trunk/; revision=11381 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 2ae18ea0c..ae36464ba 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1046,7 +1046,7 @@ class FakeVartree(portage.vartree): portdb = root_config.trees["porttree"].dbapi self.root = real_vartree.root self.settings = real_vartree.settings - mykeys = list(Package.metadata_keys) + mykeys = list(real_vartree.dbapi._aux_cache_keys) for required_key in ("COUNTER", "SLOT"): if required_key not in mykeys: mykeys.append(required_key) @@ -4182,7 +4182,7 @@ class depgraph(object): if "--usepkg" in self.myopts: db_keys = list(bindb._aux_cache_keys) dbs.append((bindb, "binary", True, False, db_keys)) - db_keys = self._mydbapi_keys + db_keys = list(trees[myroot]["vartree"].dbapi._aux_cache_keys) dbs.append((vardb, "installed", True, True, db_keys)) self._filtered_trees[myroot]["dbs"] = dbs if "--usepkg" in self.myopts: @@ -5699,10 +5699,11 @@ class depgraph(object): pkg = self._pkg_cache.get( (type_name, root_config.root, cpv, operation)) if pkg is None: - db = root_config.trees[ - self.pkg_tree_map[type_name]].dbapi - metadata = izip(Package.metadata_keys, - db.aux_get(cpv, Package.metadata_keys)) + tree_type = self.pkg_tree_map[type_name] + db = root_config.trees[tree_type].dbapi + db_keys = list(self._trees_orig[root_config.root][ + tree_type].dbapi._aux_cache_keys) + metadata = izip(db_keys, db.aux_get(cpv, db_keys)) pkg = Package(cpv=cpv, metadata=metadata, root_config=root_config, installed=installed) if type_name == "ebuild": diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index bae674154..0ce6534d1 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -498,7 +498,7 @@ class vardbapi(dbapi): self.vartree = vartree self._aux_cache_keys = set( ["CHOST", "COUNTER", "DEPEND", "DESCRIPTION", - "EAPI", "HOMEPAGE", "INHERITED", "IUSE", "KEYWORDS", + "EAPI", "HOMEPAGE", "IUSE", "KEYWORDS", "LICENSE", "PDEPEND", "PROVIDE", "RDEPEND", "repository", "RESTRICT" , "SLOT", "USE"]) self._aux_cache_obj = None