From: idl0r Date: Mon, 4 May 2009 20:23:05 +0000 (-0000) Subject: Fixed keyword sorting. X-Git-Tag: gentoolkit-0.3.0_rc5~18 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e468cfbc92d624bfa03062ab8231a1f428280d40;p=gentoolkit.git Fixed keyword sorting. svn path=/; revision=578 --- diff --git a/trunk/src/ekeyword2/ekeyword2 b/trunk/src/ekeyword2/ekeyword2 index 9eae4d5..cfb7e04 100755 --- a/trunk/src/ekeyword2/ekeyword2 +++ b/trunk/src/ekeyword2/ekeyword2 @@ -10,9 +10,11 @@ from __future__ import with_statement from sys import argv from fnmatch import fnmatch from shutil import copyfile -from portage import settings import re +import string + +from portage import settings STABLE_KEYWORDS = frozenset(settings["PORTAGE_ARCHLIST"].split()) TEST_KEYWORDS = frozenset(['~'+k for k in STABLE_KEYWORDS]) @@ -59,7 +61,9 @@ for e in ebuilds: curkw -= set(('~'+k,)) curkw |= set((k,)) - result = 'KEYWORDS="%s"' % ' '.join(sorted(curkw)) + result = 'KEYWORDS="%s"' % ' '.join(sorted(curkw, + key=lambda x: x.strip(string.punctuation).lower())) + if not pretend: try: with open(e, 'w') as rebuild: