From 9007f3699d8ca63d800340e9c269b4d4233f4866 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 13 May 2012 14:43:21 -0700 Subject: [PATCH] repoman: simplify ebuild sort code --- bin/repoman | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/bin/repoman b/bin/repoman index 3d1a4b0c1..1fc9acce2 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1347,17 +1347,6 @@ for x in effective_scanlist: pkgs[pf] = Package(cpv=cpv, metadata=myaux, root_config=root_config, type_name="ebuild") - # Sort ebuilds in ascending order for the KEYWORDS.dropped check. - pkgsplits = {} - for i in range(len(ebuildlist)): - ebuild_split = portage.pkgsplit(ebuildlist[i]) - pkgsplits[ebuild_split] = ebuildlist[i] - ebuildlist[i] = ebuild_split - ebuildlist.sort(key=cmp_sort_key(portage.pkgcmp)) - for i in range(len(ebuildlist)): - ebuildlist[i] = pkgsplits[ebuildlist[i]] - del pkgsplits - slot_keywords = {} if len(pkgs) != len(ebuildlist): @@ -1369,6 +1358,10 @@ for x in effective_scanlist: can_force = False continue + # Sort ebuilds in ascending order for the KEYWORDS.dropped check. + ebuildlist = sorted(pkgs.values()) + ebuildlist = [pkg.pf for pkg in ebuildlist] + for y in checkdirlist: m = disallowed_filename_chars_re.search(y.strip(os.sep)) if m is not None: -- 2.26.2