From b9adf0ea4864afb0f56b0ad393fffbeaee4d3930 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Fri, 27 Sep 2019 19:17:49 +0200 Subject: [PATCH] Revert remove redundant cleanup (#1567) U-boot runs several targets. Cubox, Helios4, ... and they are not cleaned at checkout. @zhangn1985 This reverts commit 357926add6d4ea05270433bee0f692e8807b73b4 Signed-off-by: Igor Pecovnik --- lib/compilation.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/compilation.sh b/lib/compilation.sh index 15f7a5702..2afc930a9 100644 --- a/lib/compilation.sh +++ b/lib/compilation.sh @@ -688,6 +688,9 @@ process_patch_file() local patch=$1 local status=$2 + # detect and remove files which patch will create + lsdiff -s --strip=1 $patch | grep '^+' | awk '{print $2}' | xargs -I % sh -c 'rm -f %' + echo "Processing file $patch" >> $DEST/debug/patching.log patch --batch --silent -p1 -N < $patch >> $DEST/debug/patching.log 2>&1