From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SThJR-0000bo-Ru for garchives@archives.gentoo.org; Sun, 13 May 2012 22:30:50 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 064B3E06EE; Sun, 13 May 2012 22:30:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id CD7F4E06EE for ; Sun, 13 May 2012 22:30:42 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 400111B4047 for ; Sun, 13 May 2012 22:30:42 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 05ADCE5429 for ; Sun, 13 May 2012 22:30:41 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1336948231.ba307ef1dc5ed986fa79fe732cc8d66820a901ef.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/versions.py X-VCS-Directories: pym/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: ba307ef1dc5ed986fa79fe732cc8d66820a901ef X-VCS-Branch: master Date: Sun, 13 May 2012 22:30:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 9d69d581-ed32-4b08-a357-2b393cfb1a52 X-Archives-Hash: 849095f14af563ff6ef19ab4b7573ffb commit: ba307ef1dc5ed986fa79fe732cc8d66820a901ef Author: Zac Medico gentoo org> AuthorDate: Sun May 13 22:30:31 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun May 13 22:30:31 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dba307ef1 _pkg_str: make version -r0 consistent with input --- pym/portage/versions.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/pym/portage/versions.py b/pym/portage/versions.py index 50eba56..298b7aa 100644 --- 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'] =3D self.cpv_split[0] + '/' + self.cpv_split[1] - self.__dict__['version'] =3D "-".join(self.cpv_split[2:]) + if self.cpv_split[-1] =3D=3D "r0" and cpv[-3:] !=3D "-r0": + self.__dict__['version'] =3D "-".join(self.cpv_split[2:-1]) + else: + self.__dict__['version'] =3D "-".join(self.cpv_split[2:]) # for match_from_list introspection self.__dict__['cpv'] =3D self if slot is not None: