From f12d25bbcb0abae496bb38ffdd3ea042163bbdde Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 26 Sep 2008 21:40:55 +0000 Subject: [PATCH] Add PROPERTIES to all of the metadata caches. svn path=/main/trunk/; revision=11561 --- bin/ebuild.sh | 2 +- bin/repoman | 5 ++--- pym/_emerge/__init__.py | 2 +- pym/portage/dbapi/bintree.py | 5 +++-- pym/portage/dbapi/porttree.py | 2 +- pym/portage/dbapi/vartree.py | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 94a08c398..f03e418d0 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1022,7 +1022,7 @@ dyn_install() { for f in ASFLAGS CATEGORY CBUILD CC CFLAGS CHOST CTARGET CXX \ CXXFLAGS DEPEND EXTRA_ECONF EXTRA_EINSTALL EXTRA_MAKE \ FEATURES INHERITED IUSE LDFLAGS LIBCFLAGS LIBCXXFLAGS \ - LICENSE PDEPEND PF PKGUSE PROVIDE RDEPEND RESTRICT SLOT \ + LICENSE PDEPEND PF PKGUSE PROPERTIES PROVIDE RDEPEND RESTRICT SLOT \ KEYWORDS HOMEPAGE SRC_URI DESCRIPTION; do [ -n "${!f}" ] && echo $(echo "${!f}" | \ tr '\n,\r,\t' ' , , ' | sed s/' \+'/' '/g) > ${f} diff --git a/bin/repoman b/bin/repoman index 7e997d3d1..db23cd10f 100755 --- a/bin/repoman +++ b/bin/repoman @@ -534,9 +534,8 @@ setconfig = load_default_config(repoman_settings, trees["/"]) root_config = RootConfig(repoman_settings, trees["/"], setconfig) # We really only need to cache the metadata that's necessary for visibility # filtering. Anything else can be discarded to reduce memory consumption. -for k in ("DEPEND", "LICENCE", "PDEPEND", - "PROVIDE", "RDEPEND", "RESTRICT", "repository"): - portdb._aux_cache_keys.discard(k) +portdb._aux_cache_keys.clear() +portdb._aux_cache_keys.update(["EAPI", "KEYWORDS", "SLOT"]) # dep_zapdeps looks at the vardbapi, but it shouldn't for repoman. del trees["/"]["vartree"] diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index d68dd80a0..57101aae8 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1412,7 +1412,7 @@ class Package(Task): "CHOST", "COUNTER", "DEPEND", "EAPI", "INHERITED", "IUSE", "KEYWORDS", "LICENSE", "PDEPEND", "PROVIDE", "RDEPEND", - "repository", "RESTRICT", "SLOT", "USE", "_mtime_"] + "repository", "PROPERTIES", "RESTRICT", "SLOT", "USE", "_mtime_"] def __init__(self, **kwargs): Task.__init__(self, **kwargs) diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index 59835c073..94fda67e5 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -32,7 +32,7 @@ class bindbapi(fakedbapi): # Selectively cache metadata in order to optimize dep matching. self._aux_cache_keys = set( ["CHOST", "DEPEND", "EAPI", "IUSE", "KEYWORDS", - "LICENSE", "PDEPEND", "PROVIDE", + "LICENSE", "PDEPEND", "PROPERTIES", "PROVIDE", "RDEPEND", "repository", "RESTRICT", "SLOT", "USE"]) self._aux_cache_slot_dict = slot_dict_class(self._aux_cache_keys) self._aux_cache = {} @@ -154,7 +154,7 @@ class binarytree(object): self._pkgindex_keys.update(["CPV", "MTIME", "SIZE"]) self._pkgindex_aux_keys = \ ["CHOST", "DEPEND", "DESCRIPTION", "EAPI", - "IUSE", "KEYWORDS", "LICENSE", "PDEPEND", + "IUSE", "KEYWORDS", "LICENSE", "PDEPEND", "PROPERTIES", "PROVIDE", "RDEPEND", "repository", "SLOT", "USE"] self._pkgindex_aux_keys = list(self._pkgindex_aux_keys) self._pkgindex_header_keys = set(["ACCEPT_KEYWORDS", "CBUILD", @@ -168,6 +168,7 @@ class binarytree(object): "LICENSE" : "", "PATH" : "", "PDEPEND" : "", + "PROPERTIES" : "", "PROVIDE" : "", "RDEPEND" : "", "RESTRICT": "", diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 2cc79b849..8d3700741 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -195,7 +195,7 @@ class portdbapi(dbapi): # Selectively cache metadata in order to optimize dep matching. self._aux_cache_keys = set( ["DEPEND", "EAPI", "INHERITED", "IUSE", "KEYWORDS", "LICENSE", - "PDEPEND", "PROVIDE", "RDEPEND", "repository", + "PDEPEND", "PROPERTIES", "PROVIDE", "RDEPEND", "repository", "RESTRICT", "SLOT"]) # Repoman modifies _aux_cache_keys, so delay _aux_cache_slot_dict diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index f5c0e2b17..becbacc17 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -637,7 +637,7 @@ class vardbapi(dbapi): self._aux_cache_keys = set( ["CHOST", "COUNTER", "DEPEND", "DESCRIPTION", "EAPI", "HOMEPAGE", "IUSE", "KEYWORDS", - "LICENSE", "PDEPEND", "PROVIDE", "RDEPEND", + "LICENSE", "PDEPEND", "PROPERTIES", "PROVIDE", "RDEPEND", "repository", "RESTRICT" , "SLOT", "USE"]) self._aux_cache_obj = None self._aux_cache_filename = os.path.join(self.root, -- 2.26.2