Make portdbapi and bindbapi cache PROVIDE in order
authorZac Medico <zmedico@gentoo.org>
Thu, 11 Oct 2007 02:02:32 +0000 (02:02 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 11 Oct 2007 02:02:32 +0000 (02:02 -0000)
to optimize matching of old-style virtuals.

svn path=/main/trunk/; revision=8041

pym/portage/dbapi/bintree.py
pym/portage/dbapi/porttree.py
pym/portage/getbinpkg.py

index e62bfee1525360e5077f2854afb534a74b12c52c..253ab507b51e94b7e40d0a0ede3d7ea40c174192 100644 (file)
@@ -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):
index 91b5b488ee811d859468b0b28440271a9b843495..6a8e441ca7ca68d246eabeb058ba20959e16d955 100644 (file)
@@ -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()
 
index 61042fde7c9b2258abd43a1515debd2efad24a77..fe2892d2d848e8f226728793fd32179f389e862b 100644 (file)
@@ -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") == "":