Gentoo Archives: gentoo-commits

From: "Paul Varner (fuzzyray)" <fuzzyray@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoolkit r865 - trunk/gentoolkit/pym/gentoolkit
Date: Mon, 22 Nov 2010 20:00:04
Message-Id: 20101122195951.9A3932004B@flycatcher.gentoo.org
1 Author: fuzzyray
2 Date: 2010-11-22 19:59:51 +0000 (Mon, 22 Nov 2010)
3 New Revision: 865
4
5 Modified:
6 trunk/gentoolkit/pym/gentoolkit/cpv.py
7 Log:
8 Fix cpv.py to handle prefix ebuild inter-revisions. Bug 313295
9
10 Modified: trunk/gentoolkit/pym/gentoolkit/cpv.py
11 ===================================================================
12 --- trunk/gentoolkit/pym/gentoolkit/cpv.py 2010-11-22 19:19:02 UTC (rev 864)
13 +++ trunk/gentoolkit/pym/gentoolkit/cpv.py 2010-11-22 19:59:51 UTC (rev 865)
14 @@ -34,6 +34,8 @@
15 "(?:_(p(?:re)?|beta|alpha|rc)\\d*)*$")
16 isvalid_cat_re = re.compile("^(?:[a-zA-Z0-9][-a-zA-Z0-9+._]*(?:/(?!$))?)+$")
17 _pkg_re = re.compile("^[a-zA-Z0-9+_]+$")
18 +# Prefix specific revision is of the form -r0<digit>+.<digit>+
19 +isvalid_rev_re = re.compile(r'(\d+|0\d+\.\d+)')
20
21 # =======
22 # Classes
23 @@ -249,6 +251,6 @@
24
25
26 def isvalid_rev(s):
27 - return s and s[0] == 'r' and s[1:] != '0' and s[1:].isdigit()
28 + return s and s[0] == 'r' and isvalid_rev_re.match(s[1:])
29
30 # vim: set ts=4 sw=4 tw=79: