create-spdx: Fix key errors in do_create_runtime_spdx

Currently, the do_create_runtime_spdx task fails with a Key Error if a
dependency is not contained in the package providers dictionary. Add a
check before using "dep" as a key in "providers".

(From OE-Core rev: ac9b387c5e19386ce3c5cd88b42dad24d25b0f70)

Signed-off-by: Andres Beltran <abeltran@linux.microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 140ce5ef5e8f10251091660e3ef76f315f409076)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Andres Beltran
2021-11-18 00:04:02 +00:00
committed by Richard Purdie
parent 5bcb2b1732
commit b4c64791a0

View File

@@ -675,6 +675,9 @@ python do_create_runtime_spdx() {
if dep in seen_deps:
continue
if dep not in providers:
continue
dep = providers[dep]
if not oe.packagedata.packaged(dep, localdata):