summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-07-18 03:59:26 +0000
committerZac Medico <zmedico@gentoo.org>2006-07-18 03:59:26 +0000
commitf606a6937edcf1db86050d6ae041245421676f3a (patch)
tree049d03b242abe9547364125a7ab56ec3c4c009c7 /bin
parentde2ffe652eec8d00db12eae891d524db9c89e626 (diff)
downloadportage-f606a6937edcf1db86050d6ae041245421676f3a.tar.gz
portage-f606a6937edcf1db86050d6ae041245421676f3a.tar.bz2
portage-f606a6937edcf1db86050d6ae041245421676f3a.zip
Use a set instead of a list for better efficiency.
svn path=/main/trunk/; revision=3916
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge5
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/emerge b/bin/emerge
index 9fc2daba8..90ec7e435 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -3234,7 +3234,7 @@ def action_depclean(settings, trees, ldpath_mtimes,
print "!!! You have no dependencies. Impossible. Bug."
sys.exit(1)
- reallist=[]
+ reallist = set()
explicitly_required = set()
for x in alldeps:
myparts=portage.catpkgsplit(string.split(x)[2])
@@ -3250,8 +3250,7 @@ def action_depclean(settings, trees, ldpath_mtimes,
continue
catpack=myparts[0]+"/"+myparts[1]
- if catpack not in reallist:
- reallist.append(catpack)
+ reallist.add(catpack)
explicitly_required.add(x.split()[2])