match-all-cpv-only: share match-all cache when ok
authorZac Medico <zmedico@gentoo.org>
Sun, 5 Jun 2011 09:15:54 +0000 (02:15 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 5 Jun 2011 09:15:54 +0000 (02:15 -0700)
pym/portage/dbapi/porttree.py

index 394a57c81061a29de2517f153fa1d93c83049d12..33c6a3b1d93e7fe89eb86402cf6f26743d836526 100644 (file)
@@ -814,6 +814,10 @@ class portdbapi(dbapi):
                        # to bypass unnecessary cache access for things like IUSE
                        # and SLOT.
                        if mydep == mykey:
+                               # Share cache with match-all/cp_list when the result is the
+                               # same. Note that this requires that mydep.repo is None and
+                               # thus mytree is also None.
+                               level = "match-all"
                                myval = self.cp_list(mykey, mytree=mytree)
                        else:
                                myval = match_from_list(mydep,