diff options
author | Andres Beltran <abeltran@linux.microsoft.com> | 2021-11-18 00:04:02 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-24 21:12:50 +0000 |
commit | b4c64791a06144f206f90234049dcaa676bfe72d (patch) | |
tree | c7d7cad9b05afda761cc37f7cb1f4b938abddcc4 | |
parent | 5bcb2b17321c7f9ea84989426cd16f0dca073bb9 (diff) | |
download | poky-b4c64791a06144f206f90234049dcaa676bfe72d.tar.gz |
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>
-rw-r--r-- | meta/classes/create-spdx.bbclass | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create-spdx.bbclass index d0cc5b1ca2..0a4db80aba 100644 --- a/meta/classes/create-spdx.bbclass +++ b/meta/classes/create-spdx.bbclass | |||
@@ -675,6 +675,9 @@ python do_create_runtime_spdx() { | |||
675 | if dep in seen_deps: | 675 | if dep in seen_deps: |
676 | continue | 676 | continue |
677 | 677 | ||
678 | if dep not in providers: | ||
679 | continue | ||
680 | |||
678 | dep = providers[dep] | 681 | dep = providers[dep] |
679 | 682 | ||
680 | if not oe.packagedata.packaged(dep, localdata): | 683 | if not oe.packagedata.packaged(dep, localdata): |