summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2023-09-28 12:34:13 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-09-29 23:07:43 +0100
commit0a3f7e0b41552e113347d6f5edefe84fd4e47fdf (patch)
tree0e24dc783701c7ce377cbde8188ea8613ef7cf26
parent2f6e3d32ad73ef8e0e3d3b89702d85c36358c00c (diff)
downloadopenembedded-core-contrib-0a3f7e0b41552e113347d6f5edefe84fd4e47fdf.tar.gz
classes/create-spdx-2.2: Show error if document is not found
As in other places, print a more helpful error if a SPDX document is not found when assembling documents for the final SPDX archive. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r--meta/classes/create-spdx-2.2.bbclass2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/classes/create-spdx-2.2.bbclass b/meta/classes/create-spdx-2.2.bbclass
index 3ee1b7ee0d..b0aef80db1 100644
--- a/meta/classes/create-spdx-2.2.bbclass
+++ b/meta/classes/create-spdx-2.2.bbclass
@@ -1131,6 +1131,8 @@ def combine_spdx(d, rootfs_name, rootfs_deploydir, rootfs_spdxid, packages, spdx
for ref in doc.externalDocumentRefs:
ref_path = oe.sbom.doc_find_by_namespace(deploy_dir_spdx, package_archs, ref.spdxDocument)
+ if not ref_path:
+ bb.fatal("Cannot find any SPDX file for document %s" % ref.spdxDocument)
collect_spdx_document(ref_path)
collect_spdx_document(image_spdx_path)