summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-24 20:03:22 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-24 20:03:22 +0000
commit12ba471d31dadbeba36a40268ef6363e38ec1cba (patch)
tree01b1f3dbf1feeb91a45bebe2e184e09ecc1ef922 /pym
parentfaa349e4a0c8635dae52b7f81772548dfe7c030c (diff)
downloadportage-12ba471d31dadbeba36a40268ef6363e38ec1cba.tar.gz
portage-12ba471d31dadbeba36a40268ef6363e38ec1cba.tar.bz2
portage-12ba471d31dadbeba36a40268ef6363e38ec1cba.zip
Clone cached match results before returning them from portdbapi.xmatch(). Thanks to Brian <dol-sen@telus.net> for reporting this issue.
svn path=/main/trunk/; revision=5382
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py4
1 files 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)