Sort keywords by reversed component list rather than combined name, in order to group Prefix keywords by system. Requested by Ulrich Müller. --- pym/gentoolkit/eshowkw/keywords_header.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pym/gentoolkit/eshowkw/keywords_header.py b/pym/gentoolkit/eshowkw/keywords_header.py index 9cda2f9..41b8ba4 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): -- 2.16.1