diff mbox series

[layerindex-web] update.py: display first unsatisfied LAYERDEPENDS

Message ID 20231117201208.678294-1-tim.orling@konsulko.com
State New
Headers show
Series [layerindex-web] update.py: display first unsatisfied LAYERDEPENDS | expand

Commit Message

Tim Orling Nov. 17, 2023, 8:12 p.m. UTC
Make errors like this more useful:

ERROR: Issues found on branch nanbield:
    meta-luneos: Failed to add since LAYERDEPENDS is not satisfied
    meta-luneui: Failed to add since LAYERDEPENDS is not satisfied

In this case, meta-luneos depends on meta-luneui, but we cannot create a
'nanbield' layer branch, because meta-luneui LAYERDEPENDS on qt6-layer
collection, which currently has no 'nanbield' branch.

Use next(iter(value['deps'])) to get the first element in the OrderedDict

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 7caaca5..cea085e 100755
--- a/layerindex/update.py
+++ b/layerindex/update.py
@@ -522,7 +522,7 @@  def main():
                         for layer, value in deps_dict_all.items():
                             logger.warn('%s: LAYERDEPENDS: %s LAYERRECOMMENDS: %s' % (layer.name, value['deps'], value['recs']))
                             if value['deps']:
-                                failed_layers[branch].append('%s: Failed to add since LAYERDEPENDS is not satisfied' % layer.name)
+                                failed_layers[branch].append('%s: Failed to add since LAYERDEPENDS [%s ...] is not satisfied' % (layer.name, next(iter(value['deps'])))
                             else:
                                 # Should never come here
                                 logger.error("Unexpected errors when sorting layers")