mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 05:29:32 +00:00
yocto-check-layer: check for duplicate layers when finding layers
detect_layers() is very greedy and if it recurses into poky or bitbake it will find the test suite layers, such as bitbake/lib/layerindexlib/tests/testdata/layer4. This is a dummy layer which claims to be openembedded-layer, so if the real openembedded-layer is a dependency then layer4 may be used instead, which will cause errors: initially because it's only compatible with Sumo, but later because it doesn't contain any recipes. Add a check that the set of layers we've found doesn't contain any duplicate collection names with different patterns, and abort if that is the case as the test will be non-deterministic. (From OE-Core rev: 0df4bae4ec67d38442620fa08c839528b425e2a8) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
2b3ae4d1ab
commit
8463a37d70
@@ -24,7 +24,7 @@ import scriptpath
|
||||
scriptpath.add_oe_lib_path()
|
||||
scriptpath.add_bitbake_lib_path()
|
||||
|
||||
from checklayer import LayerType, detect_layers, add_layers, add_layer_dependencies, get_layer_dependencies, get_signatures, check_bblayers
|
||||
from checklayer import LayerType, detect_layers, add_layers, add_layer_dependencies, get_layer_dependencies, get_signatures, check_bblayers, sanity_check_layers
|
||||
from oeqa.utils.commands import get_bb_vars
|
||||
|
||||
PROGNAME = 'yocto-check-layer'
|
||||
@@ -119,6 +119,10 @@ def main():
|
||||
for l in dep_layers:
|
||||
dump_layer_debug(l)
|
||||
|
||||
if not sanity_check_layers(additional_layers + dep_layers, logger):
|
||||
logger.error("Failed layer validation")
|
||||
return 1
|
||||
|
||||
logger.info("Detected layers:")
|
||||
for layer in layers:
|
||||
if layer['type'] == LayerType.ERROR_BSP_DISTRO:
|
||||
|
||||
Reference in New Issue
Block a user