@@ -47,6 +47,28 @@ def dump_layer_debug(layer):
if collections:
logger.debug("%s collections: %s" % (layer["name"], ", ".join(collections)))
+def skip_layer(layer, config=""):
+ """
+ The config define a file used to define the layers we need to check.
+ And the content looks like as below for example:
+ RECIPE_LIST_LAYERS = 'openembedded-layer chromium-browser-layer clang-layer'
+ The return value True indicates we need to skip the layer
+ """
+ if config and os.path.exists(config):
+ logger.debug("Reading RECIPE_LIST_LAYERS from %s" % os.path.realpath(config))
+ layerlists = []
+ collections = layer.get("collections", {})
+ if collections:
+ collections = " ".join(collections)
+ logger.debug("layername: %s, collections: %s" % (layer["name"], collections))
+ with open(config, 'r') as f:
+ for line in f:
+ if line.startswith("RECIPE_LIST_LAYERS"):
+ layerlists = line.replace("'", '').replace('"', '').split()[2:]
+ if layerlists:
+ return not (collections in layerlists)
+ return False
+
def main():
parser = argparse.ArgumentParser(
description="Yocto Project layer checking tool",
@@ -57,6 +79,8 @@ def main():
help='File to output log (optional)', action='store')
parser.add_argument('--dependency', nargs="+",
help='Layers to process for dependencies', action='store')
+ parser.add_argument("--recipe-list-layers",
+ help='Read RECIPE_LIST_LAYERS from the file, the RECIPE_LIST_LAYERS must be in one line (optional)', action='store')
parser.add_argument('--no-auto-dependency', help='Disable automatic testing of dependencies',
action='store_true')
parser.add_argument('--machines', nargs="+",
@@ -185,6 +209,12 @@ def main():
logger.info("Setting up for %s(%s), %s" % (layer['name'], layer['type'],
layer['path']))
+ if args.recipe_list_layers and skip_layer(layer, args.recipe_list_layers):
+
+ results[layer['name']] = None
+ results_status[layer['name']] = 'SKIPPED (Unsupported by RECIPE_LIST_LAYERS)'
+ layers_tested = layers_tested + 1
+ continue
missing_dependencies = not add_layer_dependencies(bblayersconf, layer, dep_layers, logger)
if not missing_dependencies:
for additional_layer in additional_layers: