Browse Source

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>
Andres Beltran 3 năm trước cách đây
mục cha
commit
7869000827
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      meta/classes/create-spdx.bbclass

+ 3 - 0
meta/classes/create-spdx.bbclass

@@ -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):