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.
This commit is contained in:
Ben Hutchings 2016-06-05 18:19:31 +01:00
parent 0724abc432
commit 07db14c867
2 changed files with 6 additions and 1 deletions

2
debian/changelog vendored
View File

@ -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@decadent.org.uk> Sat, 04 Jun 2016 18:33:11 +0100

View File

@ -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: