summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorNicolas Dechesne <nicolas.dechesne@linaro.org>2021-07-22 14:46:41 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-10 11:14:11 +0100
commit123068a0f46830431e4f86ecb16bd77df178547a (patch)
tree5d3123a5e87e5c9c7b40a3fb15741fe0bd8713d1 /scripts
parent6d7754c80eaa45dcc152de324b206404ade9ce4f (diff)
downloadpoky-123068a0f46830431e4f86ecb16bd77df178547a.tar.gz
yocto-check-layer: improve missed dependencies
The first 2 calls to add_layer_dependencies() are here to add all dependencies for the 'layer under test' and the additional layers provided by the users. In both cases, we use misssing_dependencies boolean to indicate if any dependency is missing. But we then never really use missing_dependencies. Instead the script is calling add_layer_dependencies() again (for both the layer under test, and the additional layers) to detect if there are any missing dependency. As a result, we are trying to add again all dependencies, and we can see that from the traces: INFO: Detected layers: INFO: meta-aws: LayerType.SOFTWARE, /work/oe/sources/meta-aws INFO: checklayer: Doesn't have conf/layer.conf file, so ignoring INFO: INFO: Setting up for meta-aws(LayerType.SOFTWARE), /work/oe/sources/meta-aws INFO: Adding layer meta-python INFO: Adding layer meta-oe INFO: Adding layer meta-networking --> INFO: Adding layer meta-python INFO: meta-python is already in /work/oe/poky/master/build-checklayer/conf/bblayers.conf INFO: Adding layer meta-oe INFO: meta-oe is already in /work/oe/poky/master/build-checklayer/conf/bblayers.conf INFO: Adding layer meta-networking INFO: meta-networking is already in /work/oe/poky/master/build-checklayer/conf/bblayers.conf <-- INFO: Getting initial bitbake variables ... The code appears more complex than it should, and we can simply replace the complex if statement by using missing_dependencies, and avoid duplicating the call to add_layer_dependencies(). (From OE-Core rev: 84e63d179d935a071730e89a0963bb9ae867c93b) Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit fceb84f7bc472731b8f96ee1ebf0f4485943226c) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/yocto-check-layer4
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/yocto-check-layer b/scripts/yocto-check-layer
index 84fb0011e9..847fabfd9d 100755
--- a/scripts/yocto-check-layer
+++ b/scripts/yocto-check-layer
@@ -158,9 +158,7 @@ def main():
158 if not add_layer_dependencies(bblayersconf, additional_layer, dep_layers, logger): 158 if not add_layer_dependencies(bblayersconf, additional_layer, dep_layers, logger):
159 missing_dependencies = True 159 missing_dependencies = True
160 break 160 break
161 if not add_layer_dependencies(bblayersconf, layer, dep_layers, logger) or \ 161 if missing_dependencies:
162 any(map(lambda additional_layer: not add_layer_dependencies(bblayersconf, additional_layer, dep_layers, logger),
163 additional_layers)):
164 logger.info('Skipping %s due to missing dependencies.' % layer['name']) 162 logger.info('Skipping %s due to missing dependencies.' % layer['name'])
165 results[layer['name']] = None 163 results[layer['name']] = None
166 results_status[layer['name']] = 'SKIPPED (Missing dependencies)' 164 results_status[layer['name']] = 'SKIPPED (Missing dependencies)'