Align the suffix for revision correctly.
authorTomas Chvatal <scarabeus@gentoo.org>
Sun, 30 Jan 2011 23:38:03 +0000 (00:38 +0100)
committerTomas Chvatal <scarabeus@gentoo.org>
Sun, 30 Jan 2011 23:38:03 +0000 (00:38 +0100)
pym/gentoolkit/eshowkw/keywords_content.py

index 3693c7c6d751bb2e701d7e3e6fb24d1ad2e55479..f7e57e065156a06efc1646a8b308527dc83c97a8 100644 (file)
@@ -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):