mirror of https://github.com/armbian/build.git
tools: patching: don't rewrite auto-generated patches (eg, drivers)
This commit is contained in:
parent
2c24f7e334
commit
800d92045d
|
|
@ -240,8 +240,11 @@ class PatchFileInDir:
|
|||
log.info(f"Rewriting {output_file} with new patches...")
|
||||
with open(output_file, "w") as f:
|
||||
for patch in patches:
|
||||
log.info(f"Writing patch {patch.counter} to {output_file}...")
|
||||
f.write(patch.rewritten_patch)
|
||||
if patch.parent.patch_dir.is_autogen_dir:
|
||||
log.debug(f"Skipping autogen patch {patch.counter} in file {output_file}...")
|
||||
else:
|
||||
log.info(f"Writing patch {patch.counter} to {output_file}...")
|
||||
f.write(patch.rewritten_patch)
|
||||
|
||||
|
||||
# Placeholder for future manual work
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ if apply_patches:
|
|||
commit_hash = committed['commit_hash']
|
||||
one_patch.git_commit_hash = commit_hash
|
||||
|
||||
if rewrite_patches_in_place:
|
||||
if rewrite_patches_in_place and not (one_patch.parent.patch_dir.is_autogen_dir):
|
||||
rewritten_patch = patching_utils.export_commit_as_patch(git_repo, commit_hash)
|
||||
one_patch.rewritten_patch = rewritten_patch
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue