[v1,07/10] apt: allow package downgrades in sbuild chroots

Message ID 20250725091337.534842-8-wzh@ilbers.de
State Rejected, archived
Headers show
Series None | expand

Commit Message

Zhihang Wei July 25, 2025, 9:13 a.m. UTC
From: Felix Moessbauer' via isar-users <isar-users@googlegroups.com>

The sbuild chroots carry many packages needed for the build environment.
This sometimes requires packages from bootstrapping to be downgraded so
that the dependencies can be resolved.

An example is the liblzma5 which currently (1st of May 2025) needs to be
downgraded on Debian bookworm.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc | 3 +++
 1 file changed, 3 insertions(+)

Comments

Zhihang Wei July 25, 2025, 10:54 a.m. UTC | #1
Hi,

these two duplicated patches were sent by mistake. Please ignore them.

The whole series of patches will be sent later. Sorry for the confusion.


Best,

Zhihang

On 25.07.25 11:13, Zhihang Wei wrote:
> From: Felix Moessbauer' via isar-users <isar-users@googlegroups.com>
>
> The sbuild chroots carry many packages needed for the build environment.
> This sometimes requires packages from bootstrapping to be downgraded so
> that the dependencies can be resolved.
>
> An example is the liblzma5 which currently (1st of May 2025) needs to be
> downgraded on Debian bookworm.
>
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
>   meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
> index c7ad8d51..d0b82991 100644
> --- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
> +++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
> @@ -68,6 +68,9 @@ ROOTFS_POSTPROCESS_COMMAND:remove = "rootfs_cleanup_isar_apt"
>   # Do not cleanup base-apt
>   ROOTFS_POSTPROCESS_COMMAND:remove = "rootfs_cleanup_base_apt"
>   
> +# Allow downgrades of packages from bootstrap
> +ROOTFS_APT_ARGS += "--allow-downgrades"
> +
>   DEPLOY_SCHROOT = "${@d.getVar('SCHROOT_' + d.getVar('SBUILD_VARIANT').upper() + '_DIR')}${SBUILD_SCHROOT_SUFFIX}"
>   
>   do_sbuildchroot_deploy[dirs] = "${DEPLOY_DIR}/schroot-${SBUILD_VARIANT}"

Patch

diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
index c7ad8d51..d0b82991 100644
--- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
+++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
@@ -68,6 +68,9 @@  ROOTFS_POSTPROCESS_COMMAND:remove = "rootfs_cleanup_isar_apt"
 # Do not cleanup base-apt
 ROOTFS_POSTPROCESS_COMMAND:remove = "rootfs_cleanup_base_apt"
 
+# Allow downgrades of packages from bootstrap
+ROOTFS_APT_ARGS += "--allow-downgrades"
+
 DEPLOY_SCHROOT = "${@d.getVar('SCHROOT_' + d.getVar('SBUILD_VARIANT').upper() + '_DIR')}${SBUILD_SCHROOT_SUFFIX}"
 
 do_sbuildchroot_deploy[dirs] = "${DEPLOY_DIR}/schroot-${SBUILD_VARIANT}"