From: Joshua Watt Date: Fri, 22 May 2020 22:08:26 +0000 (-0500) Subject: checklayer: Skip layers without a collection X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ae65adf471a9ad04c6a44bf020a28f1006db106a;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.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 5aeec2f00f7..11380002751 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