projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2209b21
)
_pkg_str: make version -r0 consistent with input
author
Zac Medico
<zmedico@gentoo.org>
Sun, 13 May 2012 22:30:31 +0000
(15:30 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Sun, 13 May 2012 22:30:31 +0000
(15:30 -0700)
pym/portage/versions.py
patch
|
blob
|
history
diff --git
a/pym/portage/versions.py
b/pym/portage/versions.py
index 50eba56bd16c4ef759caaeb68871f3b445082168..298b7aaca0e049b2a43c686afe2139905480d394 100644
(file)
--- a/
pym/portage/versions.py
+++ b/
pym/portage/versions.py
@@
-338,7
+338,10
@@
class _pkg_str(_unicode):
if self.cpv_split is None:
raise InvalidData(cpv)
self.__dict__['cp'] = self.cpv_split[0] + '/' + self.cpv_split[1]
- self.__dict__['version'] = "-".join(self.cpv_split[2:])
+ if self.cpv_split[-1] == "r0" and cpv[-3:] != "-r0":
+ self.__dict__['version'] = "-".join(self.cpv_split[2:-1])
+ else:
+ self.__dict__['version'] = "-".join(self.cpv_split[2:])
# for match_from_list introspection
self.__dict__['cpv'] = self
if slot is not None: