On Tue, 2026-05-26 at 06:00 +0000, Niko Mauno via lists.openembedded.org wrote: > Avoid following build breakage when IMAGE_LINK_NAME is set as empty > string: > > sbom-cve-check: error: [Errno 2] No such file or directory: > '/build/layers/openembedded-core/build/tmp/deploy/images/qemuarm/.spdx.json' > > Signed-off-by: Niko Mauno <[email protected]> > --- > meta/classes-recipe/sbom-cve-check.bbclass | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/meta/classes-recipe/sbom-cve-check.bbclass > b/meta/classes-recipe/sbom-cve-check.bbclass > index fe145a2212..39719d51dd 100644 > --- a/meta/classes-recipe/sbom-cve-check.bbclass > +++ b/meta/classes-recipe/sbom-cve-check.bbclass > @@ -14,9 +14,11 @@ python do_sbom_cve_check() { > """ > Task: Run sbom-cve-check analysis on SBOM. > """ > - sbom_path = d.expand("${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.spdx.json") > image_name = d.getVar("IMAGE_NAME") > link_name = d.getVar("IMAGE_LINK_NAME") > + sbom_path = d.expand("${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.spdx.json") > \ > + if link_name else \ > + d.expand("${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.spdx.json") > run_sbom_cve_check(d, sbom_path, image_name, link_name) > }
Whilst that works, is there any reason we shouldn't just always use IMAGE_NAME? Conditional code is harder to maintain/test... Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#237702): https://lists.openembedded.org/g/openembedded-core/message/237702 Mute This Topic: https://lists.openembedded.org/mt/119492393/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
