projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7b906f
)
Simplify Display.get_ver_str().
author
Zac Medico
<zmedico@gentoo.org>
Sun, 14 Oct 2012 02:44:18 +0000
(19:44 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Sun, 14 Oct 2012 02:44:18 +0000
(19:44 -0700)
pym/_emerge/resolver/output.py
patch
|
blob
|
history
diff --git
a/pym/_emerge/resolver/output.py
b/pym/_emerge/resolver/output.py
index 6ae022e00186a2c1845dd0c375072e8d9ca93d96..8a1e63ae5861f8fb1d62391c554bb7c822036eeb 100644
(file)
--- a/
pym/_emerge/resolver/output.py
+++ b/
pym/_emerge/resolver/output.py
@@
-676,12
+676,10
@@
class Display(object):
@param pkg: _emerge.Package.Package instance
@rtype string
"""
- ver_str = list(catpkgsplit(pkg.cpv)[2:])
- if ver_str[1] == "r0":
- ver_str[1] = ""
- else:
- ver_str[1] = "-" + ver_str[1]
- return ver_str[0]+ver_str[1]
+ ver_str = pkg.cpv.version
+ if ver_str.endswith("-r0"):
+ ver_str = ver_str[:-3]
+ return ver_str
def _get_installed_best(self, pkg, pkg_info):