ACK/Cmnt: [SRU][f:linux-restricted-modules-hwe-5.15][PATCH 1/1] UBUNTU: [Packaging] add a new migrate autogenerate option

Stefan Bader stefan.bader at canonical.com
Fri Sep 30 08:17:46 UTC 2022


On 29.09.22 18:33, Kleber Sacilotto de Souza wrote:
> BugLink: https://bugs.launchpad.net/bugs/1991130
> 
> Add a new "migrate" command to be used by 'debian/package.config' which
> contrary to "transitional" doesn't have the autogenerated contents
> filtered out by 'debian/rules.in' depending on the source's variants.
> 
> Signed-off-by: Kleber Sacilotto de Souza <kleber.souza at canonical.com>
Acked-by: Stefan Bader <stefan.bader at canonical.com>
> ---

I think this change would go into cranky fix for rollout. Until the new keyword 
gets added to config it won't have any effect on existing lrm either. So it 
should be a safe thing.
A note to consider... and not sure this will offend some darn checker, but you 
can use "<<-EOL" which allows to indent the inline doc. I believe whitespace at 
the beginning of a line gets stripped. But it would make it clearer that the 
text is inside the loop.

-Stefan

>   debian/scripts/gen-rules.lrm | 21 +++++++++++++++++++++
>   1 file changed, 21 insertions(+)
> 
> diff --git a/debian/scripts/gen-rules.lrm b/debian/scripts/gen-rules.lrm
> index 574a00ec..ebd17f1f 100755
> --- a/debian/scripts/gen-rules.lrm
> +++ b/debian/scripts/gen-rules.lrm
> @@ -25,6 +25,7 @@ mkdir -p "debian/control.d"
>   : >"debian/control.d/nvidia"
>   : >"debian/control.d/migrate-nvidia"
>   : >"debian/control.d/transitionals-local"
> +: >"debian/control.d/migrate-local"
>   : >"debian/control.d/signatures"
>   
>   cat - "debian/rules.in" >"debian/rules.gen" <<EOL
> @@ -225,3 +226,23 @@ Description: Extra drivers for nvidia-${from} (dummy transitional package)
>    Transitional package for upgrades of ${from} to ${to}.
>   EOL
>   done <"debian/package.config"
> +
> +while read command from to archs
> +do
> +	case "$command" in
> +	migrate)	;;
> +	*)		continue ;;
> +	esac
> +
> +	# debian/control.d/migrate-local
> +	echo "II: manual migrate linux-modules-nvidia-$from -> linux-modules-nvidia-$to"
> +	cat - >>"debian/control.d/migrate-local" <<EOL
> +
> +Package: linux-modules-nvidia-${from}
> +Architecture: ${archs}
> +Section: oldlibs
> +Depends: linux-modules-nvidia-${to}
> +Description: Extra drivers for nvidia-${from} (dummy transitional package)
> + Transitional package for upgrades of ${from} to ${to}.
> +EOL
> +done <"debian/package.config"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20220930/b99bd8e8/attachment.sig>


More information about the kernel-team mailing list