]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
spdx: Remove fatal errors for missing providers
authorJoshua Watt <JPEWhacker@gmail.com>
Wed, 18 Mar 2026 13:44:36 +0000 (07:44 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 20 Mar 2026 10:55:08 +0000 (10:55 +0000)
When creating images and SDKs, do not error on missing providers. This
allows recipes to use the `nospdx` inherit to prevent SPDX from being
generated, but not result in an error when assembling the final image.

Note that runtime packages generation already ignored missing
providers, so this is changing image and SDK generation to match

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/create-spdx-2.2.bbclass
meta/lib/oe/spdx30_tasks.py

index 3288cdf75a55ab5caa404f1dda6c81436fc8b1e5..aa39208eae56087b6c1828291ba072e77258292a 100644 (file)
@@ -858,7 +858,8 @@ def combine_spdx(d, rootfs_name, rootfs_deploydir, rootfs_spdxid, packages, spdx
     if packages:
         for name in sorted(packages.keys()):
             if name not in providers:
-                bb.fatal("Unable to find SPDX provider for '%s'" % name)
+                bb.note("Unable to find SPDX provider for '%s'" % name)
+                continue
 
             pkg_name, pkg_hashfn = providers[name]
 
index 5b651900c40c72fcc41cfdab13e6e379024d9ef4..c4af191974acff39f3e7622c461be66a673f716b 100644 (file)
@@ -1178,11 +1178,10 @@ def collect_build_package_inputs(d, objset, build, packages, files_by_hash=None)
     providers = oe.spdx_common.collect_package_providers(d)
 
     build_deps = set()
-    missing_providers = set()
 
     for name in sorted(packages.keys()):
         if name not in providers:
-            missing_providers.add(name)
+            bb.note(f"Unable to find SPDX provider for '{name}'")
             continue
 
         pkg_name, pkg_hashfn = providers[name]
@@ -1201,11 +1200,6 @@ def collect_build_package_inputs(d, objset, build, packages, files_by_hash=None)
             for h, f in pkg_objset.by_sha256_hash.items():
                 files_by_hash.setdefault(h, set()).update(f)
 
-    if missing_providers:
-        bb.fatal(
-            f"Unable to find SPDX provider(s) for: {', '.join(sorted(missing_providers))}"
-        )
-
     if build_deps:
         objset.new_scoped_relationship(
             [build],