From: fuzzyray Date: Mon, 22 Nov 2010 19:59:51 +0000 (-0000) Subject: Fix cpv.py to handle prefix ebuild inter-revisions. Bug 313295 X-Git-Tag: gentoolkit-0.3.0~56 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b703dc9a36dec641f017660a45197a378661d90c;p=gentoolkit.git Fix cpv.py to handle prefix ebuild inter-revisions. Bug 313295 svn path=/trunk/gentoolkit/; revision=865 --- 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+.+ +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: