Skip to contentSkip to conversation

yocto-check-layer: add debug output for the layers that were found

PATCH Superseded Ross Burton 1 participant 1 message Jan 24, 2022

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 yocto-check-layer: add debug output for the layers that were found

When debugging weird yocto-check-layer output it is useful to know what the tool found when looking for layers.

---
 scripts/yocto-check-layer | 13 +++++++++++++
 1 file changed, 13 insertions(+)
scripts/yocto-check-layer +13 -0
index 2445ad5e43f..393bee794f3 100755
@@ -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 additional 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:
Signature · 1 line
2.25.1