aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-01-23 22:38:46 +0100
committerMichał Górny <mgorny@gentoo.org>2018-01-26 15:50:50 +0100
commit6013556194c0af9cb5a61d9ffb9879c31c4669e9 (patch)
tree91cd63031a491f56d8ea06c66c95c86271d46f2d
parenteshowkw: Sort pure ~arch arches after stable keyword arches (diff)
downloadgentoolkit-6013556194c0af9cb5a61d9ffb9879c31c4669e9.tar.gz
gentoolkit-6013556194c0af9cb5a61d9ffb9879c31c4669e9.tar.bz2
gentoolkit-6013556194c0af9cb5a61d9ffb9879c31c4669e9.zip
eshowkw: Group Prefix keywords by system
Sort keywords by reversed component list rather than combined name, in order to group Prefix keywords by system. Requested by Ulrich Müller.
-rw-r--r--pym/gentoolkit/eshowkw/keywords_header.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/gentoolkit/eshowkw/keywords_header.py b/pym/gentoolkit/eshowkw/keywords_header.py
index c9f2381..ce3e8d4 100644
--- a/pym/gentoolkit/eshowkw/keywords_header.py
+++ b/pym/gentoolkit/eshowkw/keywords_header.py
@@ -145,9 +145,9 @@ class keywords_header:
# 1. arch, then ~arch
# 2. profile stability
# 3. short keywords, then long (prefix, fbsd)
- # 4. keyword name
+ # 4. keyword name in reverse component order
normal.sort(key=lambda kw: (kw in self.__TESTING_KW_ARCHS,
- levels.get(kw, 99), kw.count('-'), kw))
+ levels.get(kw, 99), kw.count('-'), list(reversed(kw.split('-')))))
return normal
def __readAdditionalFields(self):