summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-11 02:02:32 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-11 02:02:32 +0000
commit25fe98891ea96c151141121ff3d70c0552a47847 (patch)
tree4d13b3ee1bc133a6d79c23ff3fae8161cf449827
parent985d450f5d4af1e407ddfbc9ff098842279edd75 (diff)
downloadportage-25fe98891ea96c151141121ff3d70c0552a47847.tar.gz
portage-25fe98891ea96c151141121ff3d70c0552a47847.tar.bz2
portage-25fe98891ea96c151141121ff3d70c0552a47847.zip
Make portdbapi and bindbapi cache PROVIDE in order
to optimize matching of old-style virtuals. svn path=/main/trunk/; revision=8041
-rw-r--r--pym/portage/dbapi/bintree.py3
-rw-r--r--pym/portage/dbapi/porttree.py2
-rw-r--r--pym/portage/getbinpkg.py3
3 files changed, 6 insertions, 2 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index e62bfee15..253ab507b 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -26,7 +26,8 @@ class bindbapi(fakedbapi):
self.cpdict={}
# Selectively cache metadata in order to optimize dep matching.
self._aux_cache_keys = set(
- ["CHOST", "EAPI", "IUSE", "KEYWORDS", "LICENSE", "SLOT", "USE"])
+ ["CHOST", "EAPI", "IUSE", "KEYWORDS",
+ "LICENSE", "PROVIDE", "SLOT", "USE"])
self._aux_cache = {}
def match(self, *pargs, **kwargs):
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 91b5b488e..6a8e441ca 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -118,7 +118,7 @@ class portdbapi(dbapi):
self.depcachedir, x, filtered_auxdbkeys, gid=portage_gid)
# Selectively cache metadata in order to optimize dep matching.
self._aux_cache_keys = set(
- ["EAPI", "IUSE", "KEYWORDS", "LICENSE", "SLOT"])
+ ["EAPI", "IUSE", "KEYWORDS", "LICENSE", "PROVIDE", "SLOT"])
self._aux_cache = {}
self._broken_ebuilds = set()
diff --git a/pym/portage/getbinpkg.py b/pym/portage/getbinpkg.py
index 61042fde7..fe2892d2d 100644
--- a/pym/portage/getbinpkg.py
+++ b/pym/portage/getbinpkg.py
@@ -687,6 +687,7 @@ class PackageIndex(object):
continue
d.setdefault("EAPI", "0")
d.setdefault("IUSE", "")
+ d.setdefault("PROVIDE", "")
d.setdefault("SLOT", "0")
d.setdefault("USE", "")
if header_chost:
@@ -711,6 +712,8 @@ class PackageIndex(object):
del metadata["EAPI"]
if metadata.get("IUSE") == "":
del metadata["IUSE"]
+ if metadata.get("PROVIDE") == "":
+ del metadata["PROVIDE"]
if metadata.get("SLOT") == "0":
del metadata["SLOT"]
if metadata.get("USE") == "":