summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2007-10-26 01:07:06 +0000
committerMarius Mauch <genone@gentoo.org>2007-10-26 01:07:06 +0000
commit7a54724ac539d7af52d75546483dc1c169a6a941 (patch)
tree76c41c891fcfac2fb909db9a7e0e4f81a2ac6781
parent77ebe90ef7340c9e2cb4400858bc0443c72f427f (diff)
downloadportage-7a54724ac539d7af52d75546483dc1c169a6a941.tar.gz
portage-7a54724ac539d7af52d75546483dc1c169a6a941.tar.bz2
portage-7a54724ac539d7af52d75546483dc1c169a6a941.zip
break potential cycles in set expansion
svn path=/main/trunk/; revision=8303
-rw-r--r--pym/portage/sets/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage/sets/__init__.py b/pym/portage/sets/__init__.py
index 1d39d10ee..315747f10 100644
--- a/pym/portage/sets/__init__.py
+++ b/pym/portage/sets/__init__.py
@@ -94,12 +94,14 @@ class SetConfig(SafeConfigParser):
self.aliases = shortnames
return self.aliases
- def getSetAtoms(self, setname):
+ def getSetAtoms(self, setname, ignorelist=[]):
myset = self.getSetsWithAliases()[setname]
myatoms = myset.getAtoms()
+ ignorelist.append(setname)
for n in myset.getNonAtoms():
if n[0] == SETPREFIX and n[1:] in self.aliases:
- myatoms.update(self.getSetAtoms(n))
+ if n[1:] not in ignorelist:
+ myatoms.update(self.getSetAtoms(n), ignorelist=ignorelist)
return myatoms
def make_default_config(settings, trees):