summaryrefslogtreecommitdiffstats
path: root/scripts/yocto-check-layer
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-04-24 15:23:54 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-04-24 17:53:05 +0100
commitbf59f39653d70b99c12ee2f4c6949f9c9bcf5462 (patch)
tree124316f880923e02171481fc4d3bd10d92e6dbc1 /scripts/yocto-check-layer
parent01bd2843392160c4656ad6ee6cc12c40c06631fb (diff)
downloadpoky-bf59f39653d70b99c12ee2f4c6949f9c9bcf5462.tar.gz
yocto-check-layer: Avoid bug when iterating and autoadding dependencies
If iterating a layer with multiple components and auto-adding dependencies the tests can break since layers are never removed and order isn't guaranteed to account for that. Fix this by resetting the layer list back to the original list each time before auto-adding the dependencies in each case. This fixes scanning of meta-openembedded in particular where the sublayers may not be added in order of minimal dependency. (From OE-Core rev: bf1b467dacf345379cd5d84a1c9b3b0d844d5c91) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/yocto-check-layer')
-rwxr-xr-xscripts/yocto-check-layer3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/yocto-check-layer b/scripts/yocto-check-layer
index b7c83c8b54..deba3cb4f8 100755
--- a/scripts/yocto-check-layer
+++ b/scripts/yocto-check-layer
@@ -138,6 +138,9 @@ def main():
138 layer['type'] == LayerType.ERROR_BSP_DISTRO: 138 layer['type'] == LayerType.ERROR_BSP_DISTRO:
139 continue 139 continue
140 140
141 # Reset to a clean backup copy for each run
142 shutil.copyfile(bblayersconf + '.backup', bblayersconf)
143
141 if check_bblayers(bblayersconf, layer['path'], logger): 144 if check_bblayers(bblayersconf, layer['path'], logger):
142 logger.info("%s already in %s. To capture initial signatures, layer under test should not present " 145 logger.info("%s already in %s. To capture initial signatures, layer under test should not present "
143 "in BBLAYERS. Please remove %s from BBLAYERS." % (layer['name'], bblayersconf, layer['name'])) 146 "in BBLAYERS. Please remove %s from BBLAYERS." % (layer['name'], bblayersconf, layer['name']))