diff options
author | Guido Günther <agx@sigxcpu.org> | 2013-03-22 17:34:15 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2013-03-22 18:02:03 +0100 |
commit | eb999f77c3cd4fa806eea54ae82e6b9079b207c8 (patch) | |
tree | d0a9629df8d8904acf9e8a1298a9518c6840f6ff | |
parent | db3505fd249ca5437d137403d73eafe4e6087240 (diff) | |
download | git-buildpackage-eb999f77c3cd4fa806eea54ae82e6b9079b207c8.tar.gz git-buildpackage-eb999f77c3cd4fa806eea54ae82e6b9079b207c8.tar.bz2 git-buildpackage-eb999f77c3cd4fa806eea54ae82e6b9079b207c8.zip |
Allow for upper case characters in the upstream version
Closes: #703694
-rw-r--r-- | gbp/deb/__init__.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gbp/deb/__init__.py b/gbp/deb/__init__.py index 93be0593..4aadad37 100644 --- a/gbp/deb/__init__.py +++ b/gbp/deb/__init__.py @@ -32,7 +32,14 @@ debian_version_chars = 'a-zA-Z\d.~+-' class DebianPkgPolicy(PkgPolicy): - """Packaging policy for Debian""" + """ + Packaging policy for Debian Source Packages + + >>> DebianPkgPolicy.is_valid_upstreamversion('1:9.8.4.dfsg.P1-6') + True + >>> DebianPkgPolicy.is_valid_upstreamversion('-1') + False + """ # Valid package names according to Debian Policy Manual 5.6.1: # "Package names (both source and binary, see Package, Section 5.6.7) @@ -51,7 +58,7 @@ class DebianPkgPolicy(PkgPolicy): # are not allowed; if there is no epoch then colons are not allowed." # Since we don't know about any epochs and debian revisions yet, the # last two conditions are not checked. - upstreamversion_re = re.compile("^[0-9][a-z0-9\.\+\-\:\~]*$") + upstreamversion_re = re.compile("^[0-9][a-zA-Z0-9\.\+\-\:\~]*$") upstreamversion_msg = """Upstream version numbers must start with a digit and can only containg lower case letters (a-z), digits (0-9), full stops (.), plus signs (+), minus signs (-), colons (:) and tildes (~)""" |