summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2024-09-03 09:42:01 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-09-04 12:38:44 +0100
commit819ee3eff3018633009aaf8e26cfaad774c4d3d3 (patch)
treee935a3977b3dc519217a09d01a5b682a9b385908 /meta/lib
parent5f1d7da2c443247796586b6c140261890c31eb84 (diff)
downloadpoky-819ee3eff3018633009aaf8e26cfaad774c4d3d3.tar.gz
lib/spdx30_tasks: Report all missing providers
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 (From OE-Core rev: fc96244f424c8b4fbace39dc4af8a4e97f1a104e) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/spdx30_tasks.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py
index 4864d6252a..4da52da654 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):
953 providers = oe.spdx_common.collect_package_providers(d) 953 providers = oe.spdx_common.collect_package_providers(d)
954 954
955 build_deps = set() 955 build_deps = set()
956 missing_providers = set()
956 957
957 for name in sorted(packages.keys()): 958 for name in sorted(packages.keys()):
958 if name not in providers: 959 if name not in providers:
959 bb.fatal("Unable to find SPDX provider for '%s'" % name) 960 missing_providers.add(name)
961 continue
960 962
961 pkg_name, pkg_hashfn = providers[name] 963 pkg_name, pkg_hashfn = providers[name]
962 964
@@ -970,6 +972,11 @@ def collect_build_package_inputs(d, objset, build, packages):
970 ) 972 )
971 build_deps.add(pkg_spdx._id) 973 build_deps.add(pkg_spdx._id)
972 974
975 if missing_providers:
976 bb.fatal(
977 f"Unable to find SPDX provider(s) for: {', '.join(sorted(missing_providers))}"
978 )
979
973 if build_deps: 980 if build_deps:
974 objset.new_scoped_relationship( 981 objset.new_scoped_relationship(
975 [build], 982 [build],