yocto-compat-layer.py: Fix the signature validation

The initial signatures need to be collected -after- the dependency layers have
been added to the system.  Otherwise changes that happen due to dependencies,
outside of the layer being scanned, will show up as signature problems.

The add_layer function was split into two pieces so that we can process
the dependencies first, and then add the layer itself for the comparison.

(From OE-Core rev: 4eb0932e755b7cb582a8db811aeed1397ecb92cc)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Mark Hatle
2017-03-30 21:30:29 -05:00
committed by Richard Purdie
parent d2d019a11b
commit 6afe0e07ec
2 changed files with 23 additions and 13 deletions

View File

@@ -140,9 +140,7 @@ def _find_layer_depends(depend, layers):
return layer
return None
def add_layer(bblayersconf, layer, layers, logger):
logger.info('Adding layer %s' % layer['name'])
def add_layer_dependencies(bblayersconf, layer, layers, logger):
def recurse_dependencies(depends, layer, layers, logger, ret = []):
logger.debug('Processing dependencies %s for layer %s.' % \
(depends, layer['name']))
@@ -192,7 +190,10 @@ def add_layer(bblayersconf, layer, layers, logger):
logger.info('Adding layer dependency %s' % layer_depend['name'])
with open(bblayersconf, 'a+') as f:
f.write("\nBBLAYERS += \"%s\"\n" % layer_depend['path'])
return True
def add_layer(bblayersconf, layer, layers, logger):
logger.info('Adding layer %s' % layer['name'])
with open(bblayersconf, 'a+') as f:
f.write("\nBBLAYERS += \"%s\"\n" % layer['path'])