summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@gentoo.org>2010-04-14 22:46:30 +0530
committerNirbheek Chauhan <nirbheek@gentoo.org>2010-04-15 11:53:55 +0530
commit18b05f26360dbcca00599bbd18c0212861dfbc32 (patch)
tree04b7e067f3e92cd74f818c08507a50f1413da5a6 /scripts/gen_archlist.py
parentgen-archlist: Fix typo in UNSTABLE_ARCHES list (diff)
downloadgnome-18b05f26360dbcca00599bbd18c0212861dfbc32.tar.gz
gnome-18b05f26360dbcca00599bbd18c0212861dfbc32.tar.bz2
gnome-18b05f26360dbcca00599bbd18c0212861dfbc32.zip
gen-archlist: De-duplicate dependencies list before looping
Diffstat (limited to 'scripts/gen_archlist.py')
-rwxr-xr-xscripts/gen_archlist.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/gen_archlist.py b/scripts/gen_archlist.py
index 52cd19a4..7de67799 100755
--- a/scripts/gen_archlist.py
+++ b/scripts/gen_archlist.py
@@ -173,9 +173,11 @@ def get_best_deps(cpv, kws, release=None):
with max of the specified keywords
"""
atoms = portage.portdb.aux_get(cpv, ['DEPEND', 'RDEPEND', 'PDEPEND'])
+ atoms = ' '.join(atoms).split() # consolidate atoms
+ atoms = list(set(atoms)) # de-duplicate
deps = set()
tmp = []
- for atom in ' '.join(atoms).split():
+ for atom in atoms:
if atom.find('/') is -1:
# It's not a dep atom
continue