[linux] 02/05: debian/patches/features/all/rt/genpatch.py: Fix mapping of -rt version to upstream version

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Sun Jun 5 18:23:54 UTC 2016


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch master
in repository linux.

commit 07db14c867d3d2659a2f8680d0d1a935bac7d86c
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Sun Jun 5 18:19:31 2016 +0100

    debian/patches/features/all/rt/genpatch.py: Fix mapping of -rt version to upstream version
    
    Specifically, allow for a -rcN suffix on the upstream version.
---
 debian/changelog                           | 2 ++
 debian/patches/features/all/rt/genpatch.py | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 9742eec..904cb5d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,8 @@ linux (4.6.1-1~exp1) UNRELEASED; urgency=medium
     was previously removed
   * mtd: Disable slram and phram when securelevel is enabled
   * debian/patches/features/all/rt/genpatch.py: Use Python 3
+  * debian/patches/features/all/rt/genpatch.py: Fix mapping of -rt version to
+    upstream version
 
  -- Ben Hutchings <ben at decadent.org.uk>  Sat, 04 Jun 2016 18:33:11 +0100
 
diff --git a/debian/patches/features/all/rt/genpatch.py b/debian/patches/features/all/rt/genpatch.py
index 464e241..e94e67e 100755
--- a/debian/patches/features/all/rt/genpatch.py
+++ b/debian/patches/features/all/rt/genpatch.py
@@ -63,8 +63,11 @@ def main(source_dir, version):
                         origin = 'https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=%s' % match.group(1)
                         add_patch(name, source_patch, origin)
         else:
+            match = re.match(r'^(\d+\.\d+)(?:\.\d+|-rc\d+)?-rt\d+$', version)
+            assert match, 'could not parse version string'
+            up_ver = match.group(1)
+
             # Copy patch series
-            up_ver = re.sub(r'(\d+\.\d+)(?:\.\d+)?-rt\d+$', r'\1', version)
             origin = 'https://www.kernel.org/pub/linux/kernel/projects/rt/%s/patches-%s.tar.xz' % (up_ver, version)
             with open(os.path.join(source_dir, 'series'), 'r') as \
                     source_series_fh:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list