From: Luis R. Rodriguez Date: Tue, 7 May 2013 03:03:20 +0000 (-0700) Subject: gentree.py: keep patch headers for patch refresh X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f481fd7a6265aa3f0fec05ca9d920360524e2722;p=openwrt%2Fstaging%2Fblogic.git gentree.py: keep patch headers for patch refresh Without this change we were removing patch headers when refreshing patches. Cc: techtonik@gmail.com Signed-off-by: Luis R. Rodriguez Signed-off-by: Johannes Berg --- diff --git a/gentree.py b/gentree.py index 04ce0e3676e1..9d0f3ae57465 100755 --- a/gentree.py +++ b/gentree.py @@ -401,7 +401,9 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None, return 2 if args.refresh: - pfilef = open(pfile + '.tmp', 'w') + pfilef = open(pfile + '.tmp', 'a') + pfilef.write(p.top_header) + pfilef.flush() for patchitem in p.items: patched_file = '/'.join(patchitem.source.split('/')[1:]) fullfn = os.path.join(args.outdir, patched_file)