summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2015-06-25 13:22:34 +0200
committerGilles Dartiguelongue <eva@gentoo.org>2015-06-25 14:46:24 +0200
commit30e08cc1e869e0234aaacd56ed93242ba138b31d (patch)
tree2839f147ac7cc02572bf8204ea692a9f4f859489 /scripts
parentscripts/gen_archlist: use sets for manipulating keywords (diff)
downloadgnome-30e08cc1e869e0234aaacd56ed93242ba138b31d.tar.gz
gnome-30e08cc1e869e0234aaacd56ed93242ba138b31d.tar.bz2
gnome-30e08cc1e869e0234aaacd56ed93242ba138b31d.zip
scripts/gen_archlist: remove fix_nesting function
Could not figure out if this was needed at all. At least it appears it is not useful anymore. Kill its weird logic with fire.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gen_archlist.py21
1 files changed, 1 insertions, 20 deletions
diff --git a/scripts/gen_archlist.py b/scripts/gen_archlist.py
index f2a68e5f..659c84e5 100755
--- a/scripts/gen_archlist.py
+++ b/scripts/gen_archlist.py
@@ -347,25 +347,6 @@ def gen_cpv_kws(cpv, kws_aim, depgraph, check_dependencies, new_release):
return cpv_kw_list
-def fix_nesting(nested_list):
- """Takes a list of unknown nesting depth, and gives a nice list with each
- element of the form [cpv, [kws]]"""
- index = 0
- cpv_index = -1
- nice_list = []
- # Has an unpredictable nesting of lists; so we flatten it...
- flat_list = portage.flatten(nested_list)
- # ... and re-create a nice list for us to use
- while index < len(flat_list):
- if portage.catpkgsplit(flat_list[index]):
- cpv_index += 1
- nice_list.append([flat_list[index], []])
- else:
- nice_list[cpv_index][1].append(flat_list[index])
- index += 1
- return nice_list
-
-
def consolidate_dupes(cpv_kws):
"""
Consolidate duplicate cpvs with differing keywords
@@ -546,7 +527,7 @@ def main():
nothing_to_be_done(cpv)
continue
- ALL_CPV_KWS += fix_nesting(
+ ALL_CPV_KWS.append(
gen_cpv_kws(cpv, kws_missing, set([cpv]),
args.check_dependencies, args.new_version)
)