Drop third version component of 0 from upstream tags and tarball names

Also remove the temporary --override-tag option; we know what the tag
names look like.

svn path=/dists/trunk/linux-tools/; revision=19335
This commit is contained in:
Ben Hutchings 2012-08-19 22:04:11 +00:00
parent 644824c2d8
commit 59de3aea5f
2 changed files with 11 additions and 5 deletions

10
debian/bin/genorig.py vendored
View File

@ -47,7 +47,7 @@ class FileGlob(object):
class Main(object):
def __init__(self, input_files, override_version, override_tag):
def __init__(self, input_files, override_version):
self.log = sys.stdout.write
self.input_files = input_files
@ -67,7 +67,8 @@ class Main(object):
self.orig = '%s-%s' % (source, version.upstream)
self.orig_tar = '%s_%s.orig.tar.gz' % (source, version.upstream)
self.tag = override_tag or ('v' + version.upstream.replace('~', '-'))
self.tag = 'v' + re.sub(r"^(\d+\.\d+)\.0", r"\1",
version.upstream.replace('~', '-'))
def __call__(self):
import tempfile
@ -101,7 +102,7 @@ class Main(object):
def upstream_extract(self, input_tar):
self.log("Extracting tarball %s\n" % input_tar)
match = re.match(r'(^|.*/)(?P<dir>linux-\d+\.\d+\.\d+(-\S+)?)\.tar(\.(?P<extension>(bz2|gz)))?$', input_tar)
match = re.match(r'(^|.*/)(?P<dir>linux-\d+\.\d+(\.\d+)?(-\S+)?)\.tar(\.(?P<extension>(bz2|gz)))?$', input_tar)
if not match:
raise RuntimeError("Can't identify name of tarball")
@ -192,8 +193,7 @@ if __name__ == '__main__':
from optparse import OptionParser
parser = OptionParser(usage = "%prog [OPTION]... {TAR [PATCH] | REPO}")
parser.add_option("-V", "--override-version", dest = "override_version", help = "Override version", metavar = "VERSION")
parser.add_option("-t", "--override-tag", dest = "override_tag", help = "Override tag", metavar = "TAG")
options, args = parser.parse_args()
assert 1 <= len(args) <= 2
Main(args, options.override_version, options.override_tag)()
Main(args, options.override_version)()

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
linux-tools (3.5-1~experimental.1) UNRELEASED; urgency=low
* New upstream release
-- Ben Hutchings <ben@decadent.org.uk> Fri, 10 Aug 2012 03:59:44 +0100
linux-tools (3.4-1~experimental.1) experimental; urgency=low
* New upstream release