From: Thorsten Leemhuis <fed...@leemhuis.info>

process_configs: always print errors

Always print errors found while processing the configs, but only error
out when needed.

Signed-off-by: Thorsten Leemhuis <fed...@leemhuis.info>

diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -124,8 +124,8 @@ endif
 
 # options for process_configs.sh script
 ifdef NO_CONFIGCHECKS
-   PROCESS_CONFIGS_OPTS=
-   PROCESS_CONFIGS_CHECK_OPTS=
+   PROCESS_CONFIGS_CHECK_OPTS=-w -n -c -i -t
+   PROCESS_CONFIGS_OPTS=-w -n -c -i
    BUILDOPTS += -configchecks
 else
    PROCESS_CONFIGS_CHECK_OPTS=-n -t -c
diff --git a/redhat/configs/process_configs.sh 
b/redhat/configs/process_configs.sh
index blahblah..blahblah 100755
--- a/redhat/configs/process_configs.sh
+++ b/redhat/configs/process_configs.sh
@@ -14,7 +14,7 @@ usage()
        echo "process_configs.sh [ options ] package_name kernel_version"
        echo "     -a: report all errors, equivalent to [-c -n -w -i]"
        echo "     -c: error on mismatched config options"
-       echo "     -i: continue on error"
+       echo "     -i: ignore any errors, but print them"
        echo "     -n: error on unset config options"
        echo "     -t: test run, do not overwrite original config"
        echo "     -w: error on misconfigured config options"
@@ -352,6 +352,7 @@ function process_configs()
 }
 
 CHECKOPTIONS=""
+IGNOREERRORS=""
 NEWOPTIONS=""
 TESTRUN=""
 CHECKWARNINGS=""
@@ -366,6 +367,7 @@ do
        case $key in
                -a)
                        CHECKOPTIONS="x"
+                       IGNOREERRORS="x"
                        NEWOPTIONS="x"
                        CHECKWARNINGS="x"
                        ;;
@@ -375,6 +377,9 @@ do
                -h)
                        usage
                        ;;
+               -i)
+                       IGNOREERRORS="x"
+                       ;;
                -n)
                        NEWOPTIONS="x"
                        ;;
@@ -421,4 +426,8 @@ else
        process_configs
 fi
 
-exit $RETURNCODE
+if test -n "$IGNOREERRORS"; then
+       exit 0
+else
+       exit $RETURNCODE
+fi
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100644
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -2046,9 +2046,9 @@ done
 
 %{log_msg "Set process_configs.sh $OPTS"}
 cp %{SOURCE81} .
-OPTS=""
-%if %{with_configchecks}
-       OPTS="$OPTS -w -n -c"
+OPTS="-w -n -c"
+%if !%{with_configchecks}
+       OPTS="$OPTS -i"
 %endif
 %if %{with clang_lto}
 for opt in %{clang_make_opts}; do

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3682

-- 
_______________________________________________
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to