[v8,13/14] sbom-chroot: Fix python3-apt dependency

Message ID 20260727112812.2255297-14-akarpovich@ilbers.de
State New
Headers show
Series Improving base-apt usage | expand

Commit Message

Aliaksei Karpovich July 27, 2026, 11:26 a.m. UTC
Fix error:
 | E: Unable to correct problems, you have held broken packages.
 | E: The following information from --solver 3.0 may provide additional context:
 |    Unable to satisfy dependencies. Reached two conflicting decisions:
 |    1. python3-debsbom:amd64=0.8.1 is selected for install
 |    2. python3-debsbom:amd64 Depends python3-apt

Workaround for base-apt to force to install python3-apt amd64
version in case of cross build.

Signed-off-by: Aliaksei Karpovich <akarpovich@ilbers.de>
---
 meta/recipes-devtools/sbom-chroot/sbom-chroot.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jan Kiszka July 27, 2026, 11:49 a.m. UTC | #1
On 27.07.26 13:26, Aliaksei Karpovich wrote:
> Fix error:
>  | E: Unable to correct problems, you have held broken packages.
>  | E: The following information from --solver 3.0 may provide additional context:
>  |    Unable to satisfy dependencies. Reached two conflicting decisions:
>  |    1. python3-debsbom:amd64=0.8.1 is selected for install
>  |    2. python3-debsbom:amd64 Depends python3-apt
> 
> Workaround for base-apt to force to install python3-apt amd64
> version in case of cross build.
> 

"Workaround" sounds weird. Either there is an issue in the packaging, or
there is a bug in this series. But then explain why this is just a
workaround, why it can't be addressed cleanly?

Jan

> Signed-off-by: Aliaksei Karpovich <akarpovich@ilbers.de>
> ---
>  meta/recipes-devtools/sbom-chroot/sbom-chroot.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/sbom-chroot/sbom-chroot.bb b/meta/recipes-devtools/sbom-chroot/sbom-chroot.bb
> index f347327b..d23a62b6 100644
> --- a/meta/recipes-devtools/sbom-chroot/sbom-chroot.bb
> +++ b/meta/recipes-devtools/sbom-chroot/sbom-chroot.bb
> @@ -21,7 +21,7 @@ DEPENDS:append:bookworm = " python3-cyclonedx-lib"
>  DEPENDS:append:noble = " python3-cyclonedx-lib"
>  DEPENDS += "python3-debsbom python3-spdx-tools"
>  
> -SBOM_IMAGE_INSTALL = "python3-debsbom python3-spdx-tools python3-cyclonedx-lib"
> +SBOM_IMAGE_INSTALL = "python3-debsbom python3-spdx-tools python3-cyclonedx-lib python3-apt:${ROOTFS_ARCH}"
>  
>  ROOTFSDIR = "${WORKDIR}/rootfs"
>  ROOTFS_PACKAGES = "${SBOM_IMAGE_INSTALL}"

Patch

diff --git a/meta/recipes-devtools/sbom-chroot/sbom-chroot.bb b/meta/recipes-devtools/sbom-chroot/sbom-chroot.bb
index f347327b..d23a62b6 100644
--- a/meta/recipes-devtools/sbom-chroot/sbom-chroot.bb
+++ b/meta/recipes-devtools/sbom-chroot/sbom-chroot.bb
@@ -21,7 +21,7 @@  DEPENDS:append:bookworm = " python3-cyclonedx-lib"
 DEPENDS:append:noble = " python3-cyclonedx-lib"
 DEPENDS += "python3-debsbom python3-spdx-tools"
 
-SBOM_IMAGE_INSTALL = "python3-debsbom python3-spdx-tools python3-cyclonedx-lib"
+SBOM_IMAGE_INSTALL = "python3-debsbom python3-spdx-tools python3-cyclonedx-lib python3-apt:${ROOTFS_ARCH}"
 
 ROOTFSDIR = "${WORKDIR}/rootfs"
 ROOTFS_PACKAGES = "${SBOM_IMAGE_INSTALL}"