summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-04-10 04:28:22 +0000
committerZac Medico <zmedico@gentoo.org>2006-04-10 04:28:22 +0000
commit1e27b9090e51d4280b7ddbb2d58bf62c67274e3c (patch)
treef088344d4ef54c7ec2e6877f7e68163712e9f39b
parent727b869782a2943547d1623008e106e85f9504e3 (diff)
downloadportage-1e27b9090e51d4280b7ddbb2d58bf62c67274e3c.tar.gz
portage-1e27b9090e51d4280b7ddbb2d58bf62c67274e3c.tar.bz2
portage-1e27b9090e51d4280b7ddbb2d58bf62c67274e3c.zip
Simplify the porttrees logic for FetchlistDict.
svn path=/main/trunk/; revision=3113
-rw-r--r--pym/portage.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/pym/portage.py b/pym/portage.py
index b4cbf607f..33b57718f 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -6349,12 +6349,9 @@ class FetchlistDict(UserDict.DictMixin):
self.cp = os.sep.join(pkgdir.split(os.sep)[-2:])
self.settings = settings
self.db = portagetree().dbapi
- porttree = os.path.dirname(os.path.dirname(pkgdir))
- porttree_key = os.path.normpath(os.path.realpath(porttree)).strip(os.sep)
+ porttree = os.sep + os.path.normpath(os.path.dirname(os.path.dirname(pkgdir))).strip(os.sep)
# This ensures that the fetchlist comes from the correct portage tree.
- for t in self.db.porttrees:
- if os.path.normpath(os.path.realpath(t)).strip(os.sep) != porttree_key:
- self.db.porttrees.remove(t)
+ self.db.porttrees = [porttree]
def __getitem__(self, pkg_key):
return self.db.getfetchlist(pkg_key, mysettings=self.settings, all=True)[1]
def has_key(self, pkg_key):