summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-04-11 01:51:58 +0000
committerZac Medico <zmedico@gentoo.org>2006-04-11 01:51:58 +0000
commit2e792d6cca31ec5b65469610cbb004e3fc145995 (patch)
tree2e47aaab1bcee5f5d80aea6598b9e03a20bbcbc0 /pym
parent80b45c986dcf8eeb4ffe3e110239fc64b3211282 (diff)
downloadportage-2e792d6cca31ec5b65469610cbb004e3fc145995.tar.gz
portage-2e792d6cca31ec5b65469610cbb004e3fc145995.tar.bz2
portage-2e792d6cca31ec5b65469610cbb004e3fc145995.zip
Fix FetchlistDict.keys() so it does the same porttrees trick as __getitem__.
svn path=/main/trunk/; revision=3120
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 367f43544..0c0fe13fe 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -6376,7 +6376,14 @@ class FetchlistDict(UserDict.DictMixin):
return pkg_key in self.keys()
def keys(self):
"""Returns keys for all packages within pkgdir"""
- return self.db.cp_list(self.cp)
+ global portdb # has the global auxdb caches
+ all_trees = portdb.porttrees
+ # This ensures that the key list comes from the correct portage tree.
+ portdb.porttrees = self.porttrees
+ mykeys = portdb.cp_list(self.cp)
+ # XXX The db is global so we restore it's trees back to their original state.
+ portdb.porttrees = all_trees
+ return mykeys
def cleanup_pkgmerge(mypkg,origdir):
shutil.rmtree(settings["PORTAGE_TMPDIR"]+"/binpkgs/"+mypkg)