diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-05-17 11:18:46 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-05-17 11:18:46 +0200 |
commit | 33c4d21e3212eae28901a1c10f0f26c63c689089 (patch) | |
tree | 71375ea12e907a2f8d380fe0b5b8399609d71f76 /gentree.py | |
parent | c73e015c95886cc77f2af55abe93247aa1dab3c8 (diff) |
gentree: refuse patches creating files
This doesn't make sense since we'd have no way of knowing
when such a patch should be applied. Right now the patch
would be ignored, but make it extra obvious and error out
on such patches.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'gentree.py')
-rwxr-xr-x | gentree.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -364,6 +364,9 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None, # complain if it's not a patch if not p: raise Exception('No patch content found in %s' % print_name) + # leading / seems to be stripped? + if 'dev/null' in p.items[0].source: + raise Exception('Patches creating files are not supported (in %s)' % print_name) # check if the first file the patch touches exists, if so # assume the patch needs to be applied -- otherwise continue patched_file = '/'.join(p.items[0].source.split('/')[1:]) |