aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfuzzyray <fuzzyray@gentoo.org>2010-11-22 19:59:51 +0000
committerfuzzyray <fuzzyray@gentoo.org>2010-11-22 19:59:51 +0000
commitb703dc9a36dec641f017660a45197a378661d90c (patch)
tree7cc8178b9a87d0727b08679a781e225d3b1de45b /pym/gentoolkit/cpv.py
parentMove useless variable passing. (diff)
downloadgentoolkit-b703dc9a36dec641f017660a45197a378661d90c.tar.gz
gentoolkit-b703dc9a36dec641f017660a45197a378661d90c.tar.bz2
gentoolkit-b703dc9a36dec641f017660a45197a378661d90c.zip
Fix cpv.py to handle prefix ebuild inter-revisions. Bug 313295
svn path=/trunk/gentoolkit/; revision=865
Diffstat (limited to 'pym/gentoolkit/cpv.py')
-rw-r--r--pym/gentoolkit/cpv.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/gentoolkit/cpv.py b/pym/gentoolkit/cpv.py
index 6e85767..8d81c93 100644
--- a/pym/gentoolkit/cpv.py
+++ b/pym/gentoolkit/cpv.py
@@ -34,6 +34,8 @@ isvalid_version_re = re.compile("^(?:cvs\\.)?(?:\\d+)(?:\\.\\d+)*[a-z]?"
"(?:_(p(?:re)?|beta|alpha|rc)\\d*)*$")
isvalid_cat_re = re.compile("^(?:[a-zA-Z0-9][-a-zA-Z0-9+._]*(?:/(?!$))?)+$")
_pkg_re = re.compile("^[a-zA-Z0-9+_]+$")
+# Prefix specific revision is of the form -r0<digit>+.<digit>+
+isvalid_rev_re = re.compile(r'(\d+|0\d+\.\d+)')
# =======
# Classes
@@ -249,6 +251,6 @@ def isvalid_pkg_name(chunks):
def isvalid_rev(s):
- return s and s[0] == 'r' and s[1:] != '0' and s[1:].isdigit()
+ return s and s[0] == 'r' and isvalid_rev_re.match(s[1:])
# vim: set ts=4 sw=4 tw=79: