From 721dad9cf547a57bf6ce76d2cb639f3345383896 Mon Sep 17 00:00:00 2001 From: Tomas Chvatal Date: Mon, 31 Jan 2011 00:38:03 +0100 Subject: [PATCH] Align the suffix for revision correctly. --- pym/gentoolkit/eshowkw/keywords_content.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pym/gentoolkit/eshowkw/keywords_content.py b/pym/gentoolkit/eshowkw/keywords_content.py index 3693c7c..f7e57e0 100644 --- a/pym/gentoolkit/eshowkw/keywords_content.py +++ b/pym/gentoolkit/eshowkw/keywords_content.py @@ -113,9 +113,11 @@ class keywords_content: """Prefix and suffix version with string based on whether version is installed or masked and its revision.""" mask = self.__getMaskStatus(cpv) install = self.__getInstallStatus(cpv) - suffixlen = revlength - len(self.__getRevision(cpv)) + # calculate suffix length + currevlen = len(self.__getRevision(cpv)) + suffixlen = revlength - currevlen # +1 required for the dash in revision - if suffixlen != 0: + if suffixlen != 0 and currevlen == 0: suffixlen = suffixlen + 1 suffix = '' for x in range(suffixlen): -- 2.26.2