From: Tomas Chvatal Date: Sun, 30 Jan 2011 23:38:03 +0000 (+0100) Subject: Align the suffix for revision correctly. X-Git-Tag: gentoolkit-0.3.0~15^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=721dad9cf547a57bf6ce76d2cb639f3345383896;p=gentoolkit.git Align the suffix for revision correctly. --- 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):