[rt] genpatch.py: Fix parsing of upstream patches with no header

svn path=/dists/sid/linux/; revision=20451
This commit is contained in:
Ben Hutchings 2013-08-07 13:04:39 +00:00
parent 4cef35b5d8
commit 7666bbcb16
3 changed files with 6 additions and 2 deletions

1
debian/changelog vendored
View File

@ -79,6 +79,7 @@ linux (3.10.5-1) UNRELEASED; urgency=low
(Closes: #718505)
* [rt] genpatch.py: Accept missing series-rt
* [rt] Update to 3.10.4-rt1 and reenable
* [rt] genpatch.py: Fix parsing of upstream patches with no header
-- Ben Hutchings <ben@decadent.org.uk> Tue, 30 Jul 2013 18:09:20 +0200

View File

@ -33,8 +33,10 @@ def main(source_dir, version):
with open(path, 'w') as patch:
in_header = True
for line in source_patch:
if in_header and line == '\n':
if in_header and re.match(r'^(\n|[^\w\s]|Index:)', line):
patch.write('Origin: %s\n' % origin)
if line != '\n':
patch.write('\n')
in_header = False
patch.write(line)
series_fh.write(name)

View File

@ -1,8 +1,9 @@
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.10/patches-3.10.4-rt1.tar.xz
---
init/Kconfig | 1 +
mm/slab.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.10/patches-3.10.4-rt1.tar.xz
Index: linux-stable/init/Kconfig
===================================================================