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-21 11:05:02 +0000 |
commit | 786900082755d6e1b4a75a3eca217132d20e0b44 (patch) | |
tree | a72f697976e27cbfbdb167402f0e1ad7c224d937 /meta | |
parent | 3b836f58171f83498d420e50412e38a5d9796fd9 (diff) | |
download | poky-786900082755d6e1b4a75a3eca217132d20e0b44.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: 140ce5ef5e8f10251091660e3ef76f315f409076)
Signed-off-by: Andres Beltran <abeltran@linux.microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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): |