Don't cache results from match_from_list() since *dbapi.match() caches do the job...
authorZac Medico <zmedico@gentoo.org>
Thu, 6 Sep 2007 17:00:37 +0000 (17:00 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 6 Sep 2007 17:00:37 +0000 (17:00 -0000)
svn path=/main/branches/2.1.2/; revision=7730

pym/portage_dep.py

index a8007857ed89b45a93400b9c89f661a4223df217..c00da1163d790d41a0cffc025242cffb30ab7127 100644 (file)
@@ -543,8 +543,6 @@ def best_match_to_list(mypkg, mylist):
                        bestm  = x
        return bestm
 
-_match_from_list_cache = {}
-
 def match_from_list(mydep, candidate_list):
        """
        Searches list for entries that matches the package.
@@ -557,12 +555,6 @@ def match_from_list(mydep, candidate_list):
        @return: A list of package atoms that match the given package atom
        """
 
-       global _match_from_list_cache
-       cache_key = (mydep, tuple(candidate_list))
-       mylist = _match_from_list_cache.get(cache_key, None)
-       if mylist is not None:
-               return mylist[:]
-
        from portage_util import writemsg
        if mydep[0] == "!":
                mydep = mydep[1:]
@@ -666,5 +658,4 @@ def match_from_list(mydep, candidate_list):
                                continue
                        mylist.append(x)
 
-       _match_from_list_cache[cache_key] = mylist
-       return mylist[:]
+       return mylist