From 7effe1870010fdb4b530a6a29babfe9b5ecb084f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= Date: Mon, 27 Mar 2017 11:05:30 -0600 Subject: [PATCH] scripts/yocto-compat-layer.py: Add dependency validation in add_layer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some layers don't have dependencies so add a validation to avoid exception when trying to None.split(). (From OE-Core rev: 39103285029a0bb7b64dc5a305c484988b4c651a) Signed-off-by: Aníbal Limón Signed-off-by: Richard Purdie --- scripts/lib/compatlayer/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/lib/compatlayer/__init__.py b/scripts/lib/compatlayer/__init__.py index 435679edbf..58f94b778b 100644 --- a/scripts/lib/compatlayer/__init__.py +++ b/scripts/lib/compatlayer/__init__.py @@ -143,7 +143,11 @@ def add_layer(bblayersconf, layer, layers, logger): logger.info('Adding layer %s' % layer['name']) for collection in layer['collections']: - for depend in layer['collections'][collection]['depends'].split(): + depends = layer['collections'][collection]['depends'] + if not depends: + continue + + for depend in depends.split(): # core (oe-core) is suppose to be provided if depend == 'core': continue