From 180746bc00cef23b1ec7ee3f44cc2e4c735471bf Mon Sep 17 00:00:00 2001
From: Michal Hocko <mhocko@suse.com>
Date: May 15 2025 08:19:38 +0000
Subject: scripts/check-kernel-fix: print ACTION NEEDED at the end


ACTION NEEDED has been printed as soon as it is clear there is an action
required for a certain branch. This works well for regular run but it
generates a confusing output for verbose mode
    Link: https://git.kernel.org/linus/f9a9f43a62a04ec3183fb0da9226c7706eed0115
    SL-16.0: nope_commit_in_base
    SLE11-SP4-LTSS: nope_unaffected
    SLE12-SP3-TD: nope_unaffected
    ACTION NEEDED!
    SLE12-SP5: MANUAL: backport f9a9f43a62a04ec3183fb0da9226c7706eed0115 (Fixes v4.12)

fix this by printing this at the very end after all the processing is
done.

---

diff --git a/scripts/check-kernel-fix b/scripts/check-kernel-fix
index e68c8a8..42f6045 100755
--- a/scripts/check-kernel-fix
+++ b/scripts/check-kernel-fix
@@ -409,8 +409,6 @@ check_pending_pr()
 __print_action()
 {
 	if [ ! -e "$actions_file" -a $warning_only_mode -eq 0 ] ; then
-		# first action
-		echo "ACTION NEEDED!"
 		touch "$actions_file"
 	fi
 	echo $*
@@ -721,6 +719,7 @@ then
 		fi
 	fi
 else
+	echo "ACTION NEEDED!"
 	[ $git_fixes_pid -gt 0 ] && wait $git_fixes_pid
 	if [[ -s $git_fixes_output &&  ! $(grep -q "Nothing found" $git_fixes_output) ]]
 	then