summaryrefslogtreecommitdiff
path: root/gentree.py
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-05-17 11:18:46 +0200
committerJohannes Berg <johannes.berg@intel.com>2013-05-17 11:18:46 +0200
commit33c4d21e3212eae28901a1c10f0f26c63c689089 (patch)
tree71375ea12e907a2f8d380fe0b5b8399609d71f76 /gentree.py
parentc73e015c95886cc77f2af55abe93247aa1dab3c8 (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-xgentree.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gentree.py b/gentree.py
index 9d0f3ae5..86b3f3c1 100755
--- a/gentree.py
+++ b/gentree.py
@@ -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:])