Skip to contentSkip to conversation

create-spdx: Fix key errors in do_create_runtime_spdx

PATCH New Andres Beltran 1 participant 1 message Nov 18, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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".

---
 meta/classes/create-spdx.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/create-spdx.bbclass +3 -0
index c85a11595f..601a928996 100644
@@ -678,6 +678,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):
Signature · 1 line
2.17.1