ACK/Cmnt: [PATCH v2 1/1] UBUNTU: [Packaging] add a new migrate autogenerate option

Stefan Bader stefan.bader at canonical.com
Fri Mar 31 09:19:22 UTC 2023


On 30.03.23 14:57, Timo Aaltonen wrote:
> From: Kleber Sacilotto de Souza <kleber.souza at canonical.com>
> 
> 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.
> 
> v2: rebased, and added Provides which is needed to replace the old driver
> 
> Signed-off-by: Kleber Sacilotto de Souza <kleber.souza at canonical.com>
> Signed-off-by: Timo Aaltonen <timo.aaltonen at canonical.com>
Acked-by: Stefan Bader <stefan.bader at canonical.com>
> ---

I think this is basically the base so one can half-way sanely define 
which things should migrate to where. As is this should not change 
anything. So would go into LRM first...


>   debian/scripts/generate-rules | 22 ++++++++++++++++++++++
>   1 file changed, 22 insertions(+)
> 
> diff --git a/debian/scripts/generate-rules b/debian/scripts/generate-rules
> index d9a2a10..90dc570 100755
> --- a/debian/scripts/generate-rules
> +++ b/debian/scripts/generate-rules
> @@ -38,6 +38,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
> @@ -279,3 +280,24 @@ 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)	from_minus=$(echo "$from" | sed -e 's/-.*//');;
> +	*)		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
> +Provides: \${dkms:nvidia-${from_minus}-modules}, nvidia-prebuilt-kernel
> +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_0xE8675DEECBEECEA3.asc
Type: application/pgp-keys
Size: 44613 bytes
Desc: OpenPGP public key
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20230331/62c0bb38/attachment-0001.key>
-------------- 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/20230331/62c0bb38/attachment-0001.sig>


More information about the kernel-team mailing list