From: Zac Medico Date: Sun, 24 Dec 2006 20:03:22 +0000 (-0000) Subject: Clone cached match results before returning them from portdbapi.xmatch(). Thanks... X-Git-Tag: v2.1.2~224 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=12ba471d31dadbeba36a40268ef6363e38ec1cba;p=portage.git Clone cached match results before returning them from portdbapi.xmatch(). Thanks to Brian for reporting this issue. svn path=/main/trunk/; revision=5382 --- diff --git a/pym/portage.py b/pym/portage.py index 243a5c79c..a2970b2b4 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -5688,7 +5688,7 @@ class portdbapi(dbapi): #if no updates are being made to the tree, we can consult our xcache... if self.frozen: try: - return self.xcache[level][origdep] + return self.xcache[level][origdep][:] except KeyError: pass @@ -5732,7 +5732,7 @@ class portdbapi(dbapi): self.xcache[level][mydep]=myval if origdep and origdep != mydep: self.xcache[level][origdep] = myval - return myval + return myval[:] def match(self,mydep,use_cache=1): return self.xmatch("match-visible",mydep)