summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2009-06-13 23:09:06 +0200
committerGuido Günther <agx@sigxcpu.org>2009-06-13 23:09:06 +0200
commitf80ee2e53ac73063e565659d0d05068868e838d4 (patch)
tree162c43660f73aef3e8f8f1d47e8b5e9ac7acaec6
parent7de9f129883b95374240fa177948e12ddd17a342 (diff)
downloadgit-buildpackage-f80ee2e53ac73063e565659d0d05068868e838d4.tar.gz
git-buildpackage-f80ee2e53ac73063e565659d0d05068868e838d4.tar.bz2
git-buildpackage-f80ee2e53ac73063e565659d0d05068868e838d4.zip
fix one digit version numbers
-rw-r--r--gbp/deb_utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gbp/deb_utils.py b/gbp/deb_utils.py
index c439ba36..9c5b32ed 100644
--- a/gbp/deb_utils.py
+++ b/gbp/deb_utils.py
@@ -243,6 +243,8 @@ def guess_upstream_version(archive, version_regex=r''):
'0.2:~-rc1'
>>> guess_upstream_version('git-Bar-0A2d:rc1.tar.bz2')
'0A2d:rc1'
+ >>> guess_upstream_version('git-1.tar.bz2')
+ '1'
>>> guess_upstream_version('foo-Bar_0.2.orig.tar.gz')
>>> guess_upstream_version('foo-Bar-a.b.tar.gz')
"""
@@ -253,7 +255,7 @@ def guess_upstream_version(archive, version_regex=r''):
( # Debian package_<version>.orig.tar.gz:
r'^[a-z\d\.\+\-]+_(?P<version>%s+)\.orig%s',
# Upstream package-<version>.tar.gz:
- r'^[a-zA-Z\d\.\+\-]+-(?P<version>[0-9]%s+)%s'))
+ r'^[a-zA-Z\d\.\+\-]+-(?P<version>[0-9]%s*)%s'))
if version_regex:
version_filters = version_regex + version_filters
for filter in version_filters: