ACK: [SRU][J][PATCH] UBUNTU: [Packaging] config-check: Handle new annotations format 4

Andrei Gherzan andrei.gherzan at canonical.com
Wed May 31 12:02:00 UTC 2023


On 23/05/31 11:42AM, Juerg Haefliger wrote:
> For derivatives, we could end up in a situation where the master has
> already switched over to the new annotations format 4 but the derivative
> still wants to use the old scheme. In that case, the config-check script
> is still used and needs to properly handle the new annotations format 4
> (in case the derivative includes the annotations from the master).
> 
> Ignore: yes
> Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
> ---
>  debian/scripts/config-check | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/debian/scripts/config-check b/debian/scripts/config-check
> index df0cd52069b4..6e64277da00b 100755
> --- a/debian/scripts/config-check
> +++ b/debian/scripts/config-check
> @@ -58,12 +58,12 @@ sub read_annotations {
>  	die "$P: $filename: open failed -- $! -- aborting\n";
>      while (<$fd>) {
>  	if (/^# FORMAT: (\S+)/) {
> -	    die "$P: $1: unknown annotations format\n" if ($1 != 2 && $1 != 3);
> +	    die "$P: $1: unknown annotations format\n" if ($1 < 2 || $1 > 4);
>  	    $form = $1;
>  	}
>  
> -	# Format #3 adds the include directive on top of format #2:
> -	if ($form == 3 && /^\s*include(\s|$)/) {
> +	# Format #3 and #4 add the include directive on top of format #2:
> +	if ($form >= 3 && /^\s*include(\s|$)/) {
>  	    # Include quoted or unquoted files:
>  	    if (/^\s*include\s+"(.*)"\s*$/ || /^\s*include\s+(.*)$/) {
>  		# The include is relative to the current file
> -- 
> 2.37.2

Acked-by: Andrei Gherzan <andrei.gherzan at canonical.com>

-- 
Andrei Gherzan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20230531/40f234f9/attachment.sig>


More information about the kernel-team mailing list