]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
lib/spdx30_tasks: Report all missing providers
authorJoshua Watt <JPEWhacker@gmail.com>
Tue, 3 Sep 2024 15:42:01 +0000 (09:42 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 4 Sep 2024 11:36:43 +0000 (12:36 +0100)
Instead of failing on the first missing provider, collect all of them
and report them all as it is more convenient for end users trying to fix
problems

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

index 4864d6252a6f9fb722e2d19a5e704923f1f323ce..4da52da654dbc65874a1ea3e4628c0644575a995 100644 (file)
@@ -953,10 +953,12 @@ def collect_build_package_inputs(d, objset, build, packages):
     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:
-            bb.fatal("Unable to find SPDX provider for '%s'" % name)
+            missing_providers.add(name)
+            continue
 
         pkg_name, pkg_hashfn = providers[name]
 
@@ -970,6 +972,11 @@ def collect_build_package_inputs(d, objset, build, packages):
         )
         build_deps.add(pkg_spdx._id)
 
+    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],