]> code.ossystems Code Review - openembedded-core.git/commitdiff
create-spdx: Fix key errors in do_create_runtime_spdx
authorAndres Beltran <abeltran@linux.microsoft.com>
Thu, 18 Nov 2021 00:04:02 +0000 (00:04 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 21 Nov 2021 11:04:20 +0000 (11:04 +0000)
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".

Signed-off-by: Andres Beltran <abeltran@linux.microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/create-spdx.bbclass

index d0cc5b1ca28abe93f2b4220e88bc0887ce19d4c7..0a4db80aba50fe26fb9cd88c8e90879fcb06137d 100644 (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):