* [OE-core][PATCH] lib/spdx30_tasks: Report all missing providers
@ 2024-09-03 15:42 Joshua Watt
0 siblings, 0 replies; only message in thread
From: Joshua Watt @ 2024-09-03 15:42 UTC (permalink / raw)
To: openembedded-core; +Cc: Joshua Watt
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>
---
meta/lib/oe/spdx30_tasks.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py
index 4864d6252a6..4da52da654d 100644
--- a/meta/lib/oe/spdx30_tasks.py
+++ b/meta/lib/oe/spdx30_tasks.py
@@ -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],
--
2.46.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-03 15:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03 15:42 [OE-core][PATCH] lib/spdx30_tasks: Report all missing providers Joshua Watt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox