+ is a valid character in version numbers
authorGuido Günther <agx@sigxcpu.org>
Fri, 3 Jul 2009 14:15:24 +0000 (16:15 +0200)
committerGuido Günther <agx@sigxcpu.org>
Fri, 3 Jul 2009 14:15:24 +0000 (16:15 +0200)
gbp/deb_utils.py

index 9c5b32e..d701eb4 100644 (file)
@@ -245,10 +245,12 @@ def guess_upstream_version(archive, version_regex=r''):
     '0A2d:rc1'
     >>> guess_upstream_version('git-1.tar.bz2')
     '1'
+    >>> guess_upstream_version('kvm_87+dfsg.orig.tar.gz')
+    '87+dfsg'
     >>> guess_upstream_version('foo-Bar_0.2.orig.tar.gz')
     >>> guess_upstream_version('foo-Bar-a.b.tar.gz')
     """
-    version_chars = r'[a-zA-Z\d\.\~\-\:]'
+    version_chars = r'[a-zA-Z\d\.\~\-\:\+]'
     extensions = r'\.tar\.(gz|bz2)'
 
     version_filters = map ( lambda x: x % (version_chars, extensions),