]> code.ossystems Code Review - openembedded-core.git/commitdiff
yocto-check-layer: add debug output for the layers that were found
authorRoss Burton <ross@burtonini.com>
Mon, 24 Jan 2022 16:25:43 +0000 (16:25 +0000)
committerAnuj Mittal <anuj.mittal@intel.com>
Fri, 4 Feb 2022 03:18:05 +0000 (11:18 +0800)
When debugging weird yocto-check-layer output it is useful to know
what the tool found when looking for layers.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 711e2d4d7baf36f8497741c14268d7f72d0db016)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
scripts/yocto-check-layer

index 2445ad5e43fd45eb8fdbbf5cd23b9891d04e8b42..f3cf139d8a5051e018265749fa6ad3bd12c0cc4b 100755 (executable)
@@ -41,6 +41,12 @@ def test_layer(td, layer, test_software_layer_signatures):
     tc.loadTests(CASES_PATHS)
     return tc.runTests()
 
+def dump_layer_debug(layer):
+    logger.debug("Found layer %s (%s)" % (layer["name"], layer["path"]))
+    collections = layer.get("collections", {})
+    if collections:
+        logger.debug("%s collections: %s" % (layer["name"], ", ".join(collections)))
+
 def main():
     parser = argparse.ArgumentParser(
             description="Yocto Project layer checking tool",
@@ -106,6 +112,13 @@ def main():
     else:
         dep_layers = layers
 
+    logger.debug("Found additional layers:")
+    for l in additional_layers:
+        dump_layer_debug(l)
+    logger.debug("Found dependency layers:")
+    for l in dep_layers:
+        dump_layer_debug(l)
+
     logger.info("Detected layers:")
     for layer in layers:
         if layer['type'] == LayerType.ERROR_BSP_DISTRO: