From: Joshua Watt Date: Fri, 22 May 2020 22:08:26 +0000 (-0500) Subject: checklayer: Skip layers without a collection X-Git-Tag: 2020-04.1-dunfell~29 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=ae65adf471a9ad04c6a44bf020a28f1006db106a;p=openembedded-core.git checklayer: Skip layers without a collection 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 Signed-off-by: Richard Purdie (cherry picked from commit 26090a2861ebe21224aaf89d7be0c0a89ca58e48) Signed-off-by: Steve Sakoman --- diff --git a/scripts/lib/checklayer/__init__.py b/scripts/lib/checklayer/__init__.py index 5aeec2f00f..1138000275 100644 --- a/scripts/lib/checklayer/__init__.py +++ b/scripts/lib/checklayer/__init__.py @@ -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