summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2006-10-05 19:37:39 +0200
committerGuido Guenther <agx@bogon.sigxcpu.org>2006-10-05 19:37:39 +0200
commit0608261f07f4bdd12944deed887f5eebbf5ce946 (patch)
treef64cc09715dcde24a1c8b49dff30ae5521303da8
parent7f1faea64d42f069386352135a696b18aa6b4d5d (diff)
downloadgit-buildpackage-0608261f07f4bdd12944deed887f5eebbf5ce946.tar.gz
git-buildpackage-0608261f07f4bdd12944deed887f5eebbf5ce946.tar.bz2
git-buildpackage-0608261f07f4bdd12944deed887f5eebbf5ce946.zip
allow for '+' in Debian as well as upstream version numbers
-rw-r--r--debian/changelog4
-rwxr-xr-xgit-import-dsc10
2 files changed, 8 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog
index 84c5c715..1fe1e327 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,10 @@ git-buildpackage (0.2.6) git-buildpackage; urgency=low
* run pychecker during build
* also filter out git metadata when building tarballs, not only when
building diffs (affects Debian native packages)
+ * git-import-dsc: allow for '+' in Debian as well as upstream version
+ numbers
- -- Guido Guenther <agx@sigxcpu.org> Thu, 5 Oct 2006 19:30:00 +0200
+ -- Guido Guenther <agx@sigxcpu.org> Thu, 5 Oct 2006 19:35:31 +0200
git-buildpackage (0.2.5) git-buildpackage; urgency=low
diff --git a/git-import-dsc b/git-import-dsc
index b32420e0..59d7b5ed 100755
--- a/git-import-dsc
+++ b/git-import-dsc
@@ -32,8 +32,8 @@ gitTag=GitTag()
class DscPackage(object):
"""Parse the dsc file for verions, package names, etc"""
pkgre=re.compile('Source: (?P<pkg>[\w\-]+)')
- versionre=re.compile('Version: (?P<upstream>[a-z\d\.]+)(-(?P<debian>[a-z\d\.~]+))?')
- tarre=re.compile ('^ [\da-z]+ \d+ (?P<tar>[a-z\d-]+_[a-z\d\.\~\-]+(\.orig)?\.tar\.gz)')
+ versionre=re.compile('Version: (?P<upstream>[a-z\d\.\+]+)(-(?P<debian>[a-z\d\.~\+]+))?')
+ tarre=re.compile ('^ [\da-z]+ \d+ (?P<tar>[a-z\d\-]+_[a-z\d\.\~\+\-]+(\.orig)?\.tar\.gz)')
def __init__(self, dscfile):
self.dscfile=os.path.abspath(dscfile)
@@ -77,7 +77,7 @@ def import_upstream(src, dirs, upstream_branch):
os.chdir(dirs['git'])
GitInitDB()()
gitAdd(['.'])
- gitCommitAll(msg="Imported upstream version %s" % (src.upstream_version,))
+ gitCommitAll(msg="Imported %s version %s" % (['upstream','Debian'][src.native],src.upstream_version,))
gitTag(src.upstream_version)
if not src.native:
GitBranch()(upstream_branch)
@@ -92,10 +92,10 @@ def apply_debian_patch(src, dirs):
try:
DpkgSourceExtract()(src.dscfile, dirs['dpkg-src'])
os.chdir(dirs['git'])
- GitLoadDirs()(dirs['dpkg-src'], 'Imported debian patch')
+ GitLoadDirs()(dirs['dpkg-src'], 'Imported Debian patch')
gitTag('%s-%s' % (src.upstream_version, src.debian_version))
except CommandExecFailed:
- print >>sys.stderr,"Failed to import debian package"
+ print >>sys.stderr,"Failed to import Debian package"
return 1
return 0