]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
scripts/patch-kernel.sh: do not try to check files after patch 20141/head
authorGeorge Tsiamasiotis <george@tsiamasiotis.gr>
Tue, 23 Sep 2025 20:11:19 +0000 (23:11 +0300)
committerRobert Marko <robimarko@gmail.com>
Mon, 29 Sep 2025 11:33:07 +0000 (13:33 +0200)
Since we are not using patch -b, *.orig files are only created when
there are conflicts, or never according to posix patch.

As such, it doesn't really make sense to always delete *.orig files
presuming they are patch backups, even if they are patch backups.
Doing so is both deleting potentially useful information for failed
patch applications and creating hard to diagnose bugs [1].

In a similar vein, checking for *.rej files does not add any value
since we're already checking the patch command's return code.

[1]: https://github.com/openwrt/packages/issues/27485

Signed-off-by: George Tsiamasiotis <george@tsiamasiotis.gr>
Link: https://github.com/openwrt/openwrt/pull/20141
Signed-off-by: Robert Marko <robimarko@gmail.com>
scripts/patch-kernel.sh

index 52750dde6edf19508a7cac9e8d4f92292e137810..84bcba8858cfc154755de3dd5bb33a8a9d35997d 100755 (executable)
@@ -43,12 +43,3 @@ for i in ${patchdir}/${patchpattern} ; do
        exit 1
     fi
 done
-
-# Check for rejects...
-if [ "`find $targetdir/ '(' -name '*.rej' -o -name '.*.rej' ')' -print`" ] ; then
-    echo "Aborting.  Reject files found."
-    exit 1
-fi
-
-# Remove backup files
-find $targetdir/ '(' -name '*.orig' -o -name '.*.orig' ')' -exec rm -f {} \;