[kernel] r17992 - dists/trunk/linux-2.6/debian/bin

Ben Hutchings benh at alioth.debian.org
Wed Aug 24 14:20:25 UTC 2011


Author: benh
Date: Wed Aug 24 14:20:24 2011
New Revision: 17992

Log:
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.

Modified:
   dists/trunk/linux-2.6/debian/bin/genorig.py

Modified: dists/trunk/linux-2.6/debian/bin/genorig.py
==============================================================================
--- dists/trunk/linux-2.6/debian/bin/genorig.py	Wed Aug 24 02:52:19 2011	(r17991)
+++ dists/trunk/linux-2.6/debian/bin/genorig.py	Wed Aug 24 14:20:24 2011	(r17992)
@@ -13,7 +13,7 @@
 from debian_linux.patches import PatchSeries
 
 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
@@ -33,7 +33,8 @@
 
         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
@@ -65,7 +66,7 @@
 
     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")
 
@@ -130,8 +131,7 @@
     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)()



More information about the Kernel-svn-changes mailing list