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>
# 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:])