diff mbox series

[Unstable] UBUNTU: [Packaging] kernelconfig: Bubble up warnings and errors

Message ID 20220509091206.95819-1-juergh@canonical.com
State New
Headers show
Series [Unstable] UBUNTU: [Packaging] kernelconfig: Bubble up warnings and errors | expand

Commit Message

Juerg Haefliger May 9, 2022, 9:12 a.m. UTC
Config annotation check failures and warnings due to incomplete config
operations are really bad, so exit the script with a non-zero status if
such errors or warnings are detected.

Ignore: yes
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
---
 debian/scripts/misc/kernelconfig | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Tim Gardner May 9, 2022, 11:37 a.m. UTC | #1
Acked-by: Tim Gardner <tim.gardner@canonical.com>

On 5/9/22 03:12, Juerg Haefliger wrote:
> Config annotation check failures and warnings due to incomplete config
> operations are really bad, so exit the script with a non-zero status if
> such errors or warnings are detected.
> 
> Ignore: yes
> Signed-off-by: Juerg Haefliger <juergh@canonical.com>
> ---
>   debian/scripts/misc/kernelconfig | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/debian/scripts/misc/kernelconfig b/debian/scripts/misc/kernelconfig
> index f95396e28f28..31b4259a1fcb 100755
> --- a/debian/scripts/misc/kernelconfig
> +++ b/debian/scripts/misc/kernelconfig
> @@ -192,7 +192,9 @@ for arch in $archs; do
>   	done
>   done
>   
> +rc=0
>   if [ "$fail" != 0 ]; then
> +	rc=1
>   	echo ""
>   	echo "*** ERROR: $fail config-check failures detected"
>   	echo ""
> @@ -201,7 +203,10 @@ fi
>   rm -rf build
>   
>   if [ "$warning_partial" ]; then
> +	rc=1
>   	echo ""
>   	echo "WARNING: configuration operation applied only to a subset of architectures (skipped$warning_partial)" 1>&2
>   	echo ""
>   fi
> +
> +exit "${rc}"
Andrea Righi June 13, 2022, 6:54 a.m. UTC | #2
On Mon, May 09, 2022 at 11:12:06AM +0200, Juerg Haefliger wrote:
> Config annotation check failures and warnings due to incomplete config
> operations are really bad, so exit the script with a non-zero status if
> such errors or warnings are detected.
> 
> Ignore: yes
> Signed-off-by: Juerg Haefliger <juergh@canonical.com>

I like this, we should definitely treat these warnings as errors here.

Acked-by: Andrea Righi <andrea.righi@canonical.com>

> ---
>  debian/scripts/misc/kernelconfig | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/debian/scripts/misc/kernelconfig b/debian/scripts/misc/kernelconfig
> index f95396e28f28..31b4259a1fcb 100755
> --- a/debian/scripts/misc/kernelconfig
> +++ b/debian/scripts/misc/kernelconfig
> @@ -192,7 +192,9 @@ for arch in $archs; do
>  	done
>  done
>  
> +rc=0
>  if [ "$fail" != 0 ]; then
> +	rc=1
>  	echo ""
>  	echo "*** ERROR: $fail config-check failures detected"
>  	echo ""
> @@ -201,7 +203,10 @@ fi
>  rm -rf build
>  
>  if [ "$warning_partial" ]; then
> +	rc=1
>  	echo ""
>  	echo "WARNING: configuration operation applied only to a subset of architectures (skipped$warning_partial)" 1>&2
>  	echo ""
>  fi
> +
> +exit "${rc}"
> -- 
> 2.32.0
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
diff mbox series

Patch

diff --git a/debian/scripts/misc/kernelconfig b/debian/scripts/misc/kernelconfig
index f95396e28f28..31b4259a1fcb 100755
--- a/debian/scripts/misc/kernelconfig
+++ b/debian/scripts/misc/kernelconfig
@@ -192,7 +192,9 @@  for arch in $archs; do
 	done
 done
 
+rc=0
 if [ "$fail" != 0 ]; then
+	rc=1
 	echo ""
 	echo "*** ERROR: $fail config-check failures detected"
 	echo ""
@@ -201,7 +203,10 @@  fi
 rm -rf build
 
 if [ "$warning_partial" ]; then
+	rc=1
 	echo ""
 	echo "WARNING: configuration operation applied only to a subset of architectures (skipped$warning_partial)" 1>&2
 	echo ""
 fi
+
+exit "${rc}"