]> code.ossystems Code Review - openembedded-core.git/commitdiff
checklayer: Skip layers without a collection
authorJoshua Watt <JPEWhacker@gmail.com>
Fri, 22 May 2020 22:08:26 +0000 (17:08 -0500)
committerSteve Sakoman <steve@sakoman.com>
Tue, 26 May 2020 16:42:17 +0000 (06:42 -1000)
As in other places in the file, skip layers that don't define a
collection when searching for a layer to resolve a dependency. Fixes
KeyError exceptions when attempting to access the layer collections
later

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 26090a2861ebe21224aaf89d7be0c0a89ca58e48)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
scripts/lib/checklayer/__init__.py

index 5aeec2f00f75eae78e7140679e22b70bd73d3eb5..1138000275192ed95fe9325412faa35518e104e6 100644 (file)
@@ -143,6 +143,9 @@ def detect_layers(layer_directories, no_auto):
 
 def _find_layer_depends(depend, layers):
     for layer in layers:
+        if 'collections' not in layer:
+            continue
+
         for collection in layer['collections']:
             if depend == collection:
                 return layer