aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2011-01-31 00:38:03 +0100
committerTomas Chvatal <scarabeus@gentoo.org>2011-01-31 00:38:03 +0100
commit721dad9cf547a57bf6ce76d2cb639f3345383896 (patch)
tree6e131238364ffcd99264a3bdfee9a54eaba37c80 /pym/gentoolkit/eshowkw
parentAlign revision nicely so it is space separated and easier to spot. (diff)
downloadgentoolkit-721dad9cf547a57bf6ce76d2cb639f3345383896.tar.gz
gentoolkit-721dad9cf547a57bf6ce76d2cb639f3345383896.tar.bz2
gentoolkit-721dad9cf547a57bf6ce76d2cb639f3345383896.zip
Align the suffix for revision correctly.
Diffstat (limited to 'pym/gentoolkit/eshowkw')
-rw-r--r--pym/gentoolkit/eshowkw/keywords_content.py6
1 files 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):