diff --git a/lib/tools/patching.py b/lib/tools/patching.py index d14c53f6987c..59b9e096bcf9 100755 --- a/lib/tools/patching.py +++ b/lib/tools/patching.py @@ -375,9 +375,11 @@ parent.rewrite_patch_file(patches) FAILED_PATCHES = [one_patch for one_patch in VALID_PATCHES if (not one_patch.applied_ok) or (one_patch.rewritten_patch is None)] for failed_patch in FAILED_PATCHES: - log.info( - f"Consider removing {failed_patch.parent.full_file_path()}(:{failed_patch.counter}); " - f"it was not applied successfully.") + log.warning( + f"Removing {failed_patch.parent.full_file_path()}(:{failed_patch.counter}); " + f" it failed to apply/was not rewritten.") + os.remove(failed_patch.parent.full_file_path()) + # Create markdown about the patches readme_markdown: "str | None" = None