diff mbox series

[layerindex-web] update.py: show branch if missing conf/layer.conf

Message ID 20231117194527.674028-1-tim.orling@konsulko.com
State New
Headers show
Series [layerindex-web] update.py: show branch if missing conf/layer.conf | expand

Commit Message

Tim Orling Nov. 17, 2023, 7:45 p.m. UTC
Currently, the error message is something like:
ERROR: conf/layer.conf not found for layer meta-doom - is subdirectory set correctly?

This is because in this case meta-doom has a 'langdale' branch without
a conf/layer.conf

Another example is:
ERROR: conf/layer.conf not found for layer meta-st-stm32mp - is subdirectory set correctly?

This is because meta-st-stm32mp has a master branch, but it only contains
a README.md telling you to use the stable branches (e.g. nanbield).

Make it more obvious what the source of the error is by also displaying
the branch that was being attempted.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
 layerindex/update.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/layerindex/update.py b/layerindex/update.py
index 3da74e3..7caaca5 100755
--- a/layerindex/update.py
+++ b/layerindex/update.py
@@ -426,7 +426,7 @@  def main():
                             continue
 
                         if not os.path.exists(os.path.join(layerdir, 'conf/layer.conf')):
-                            logger.error("conf/layer.conf not found for layer %s - is subdirectory set correctly?" % layer.name)
+                            logger.error("conf/layer.conf not found for layer %s (branch %s) - is subdirectory set correctly?" % (layer.name, branch))
                             continue
 
                     cmd = prepare_update_layer_command(options, branchobj, layer, initial=True)