From 12ba471d31dadbeba36a40268ef6363e38ec1cba Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 24 Dec 2006 20:03:22 +0000 Subject: [PATCH] Clone cached match results before returning them from portdbapi.xmatch(). Thanks to Brian for reporting this issue. svn path=/main/trunk/; revision=5382 --- pym/portage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.26.2