"""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):