diff mbox series

[1/2] sbom-cve-check-common: Fatalize command failure

Message ID 20260526060000.874022-1-niko.mauno@vaisala.com
State Under Review
Headers show
Series [1/2] sbom-cve-check-common: Fatalize command failure | expand

Commit Message

Niko Mauno May 26, 2026, 5:59 a.m. UTC
Change the bb.error to bb.fatal in order to avoid marking the
'sbom_cve_check' task successful, even when it encounters an error,
like:

  sbom-cve-check: error: [Errno 2] No such file or directory: '/build/layers/openembedded-core/build/tmp/deploy/images/qemuarm/.spdx.json'

  -NOTE: Tasks Summary: Attempted 5946 tasks of which 5283 didn't need to be rerun and all succeeded.
  +NOTE: Tasks Summary: Attempted 5945 tasks of which 5944 didn't need to be rerun and 1 failed.

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
---
 meta/classes/sbom-cve-check-common.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes/sbom-cve-check-common.bbclass b/meta/classes/sbom-cve-check-common.bbclass
index 32c29a0ec2..1bd1af22b6 100644
--- a/meta/classes/sbom-cve-check-common.bbclass
+++ b/meta/classes/sbom-cve-check-common.bbclass
@@ -117,8 +117,7 @@  def run_sbom_cve_check(d, sbom_path, export_base_name, export_link_name=None):
         bb.note("Running: {}".format(" ".join(cmd_args)))
         bb.process.run(cmd_args, env=cmd_env)
     except bb.process.ExecutionError as e:
-        bb.error(f"sbom-cve-check failed: {e}")
-        return
+        bb.fatal(f"sbom-cve-check failed: {e}")
 
     show_warnings = bb.utils.to_boolean(d.getVar("SBOM_CVE_CHECK_SHOW_WARNINGS"))