[3/6] wic: make dependency to sbom chroot explicit

Message ID 20260720081347.3835974-4-felix.moessbauer@siemens.com
State New
Headers show
Series Rework SBOM generation | expand

Commit Message

Felix Moessbauer July 20, 2026, 8:13 a.m. UTC
If the rootfs feature generate-sbom is enabled, the wic task also
generates an imager sbom and merges it with the rootfs SBOM. For that,
the SBOM chroot needs to be deployed, which currently implicitly happens
as the wic task requires the do_rootfs_install task to be executed,
which in turn depends on the SBOM chroot.

We now make this dependency explicit to be able to later cache the
expensive rootfs SBOM task.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/classes-recipe/imagetypes_wic.bbclass | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/meta/classes-recipe/imagetypes_wic.bbclass b/meta/classes-recipe/imagetypes_wic.bbclass
index 3c65ed0d..c1647081 100644
--- a/meta/classes-recipe/imagetypes_wic.bbclass
+++ b/meta/classes-recipe/imagetypes_wic.bbclass
@@ -143,6 +143,7 @@  check_for_wic_warnings() {
     fi
 }
 
+do_image_wic[depends] += "${@bb.utils.contains('ROOTFS_FEATURES', 'generate-sbom', 'sbom-chroot:do_sbomchroot_deploy', '', d)}"
 do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
 IMAGE_CMD:wic() {
     generate_wic_image