git: be778581eb31 - stable/14 - depend-cleanup.sh: Fix overzealous rescue.mk cleanup

From: Jessica Clarke <jrtc27_at_FreeBSD.org>
Date: Mon, 09 Dec 2024 16:25:02 UTC
The branch stable/14 has been updated by jrtc27:

URL: https://cgit.FreeBSD.org/src/commit/?id=be778581eb3168bcd8f9d8034e5175873efba416

commit be778581eb3168bcd8f9d8034e5175873efba416
Author:     Jessica Clarke <jrtc27@FreeBSD.org>
AuthorDate: 2024-09-10 16:33:06 +0000
Commit:     Jessica Clarke <jrtc27@FreeBSD.org>
CommitDate: 2024-12-09 16:24:25 +0000

    depend-cleanup.sh: Fix overzealous rescue.mk cleanup
    
    grep -q -v means "are there any lines that don't match", not "are there
    no lines that match", and since the file has lines other than ones with
    nvme_util.o when up-to-date this triggers on every build.
    
    Fixes:          26a09db3add3 ("Fix incremental build with WITH_NVME newly enabled")
    MFC after:      1 week
    
    (cherry picked from commit e546c3950a2c98b298b8ddfb68b50cb496fe7fac)
---
 tools/build/depend-cleanup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh
index aad4f6b9218f..7441cd1d7d81 100755
--- a/tools/build/depend-cleanup.sh
+++ b/tools/build/depend-cleanup.sh
@@ -162,7 +162,7 @@ fi
 
 # 20240416  2fda3ab0ac19    WITH_NVME: Remove from broken
 if [ -f "$OBJTOP"/rescue/rescue/rescue.mk ] && \
-    grep -q -v 'nvme_util.o' "$OBJTOP"/rescue/rescue/rescue.mk; then
+    ! grep -q 'nvme_util.o' "$OBJTOP"/rescue/rescue/rescue.mk; then
 	echo "removing rescue.mk without nvme_util.o"
 	run rm -f "$OBJTOP"/rescue/rescue/rescue.mk
 fi