Fixed keyword sorting.
authoridl0r <idl0r@gentoo.org>
Mon, 4 May 2009 20:23:05 +0000 (20:23 -0000)
committeridl0r <idl0r@gentoo.org>
Mon, 4 May 2009 20:23:05 +0000 (20:23 -0000)
svn path=/; revision=578

trunk/src/ekeyword2/ekeyword2

index 9eae4d5bc4c8a4403967d9f373a9876089a2e4a6..cfb7e045e9ef86bac8ab87b56bf7982ffd7fbd94 100755 (executable)
@@ -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: