Skip to contentSkip to conversation

cookerdata: Improve missing core layer error message

PATCH New Richard Purdie 1 participant 1 message Sep 10, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cookerdata: Improve missing core layer error message

If the core layer is missing from bblayers.conf, the message the user sees is hard to understand. Improve it.

[YOCTO #14340]

---
 lib/bb/cookerdata.py | 2 ++
 1 file changed, 2 insertions(+)
lib/bb/cookerdata.py +2 -0
index 1c1e008c6b..e54858cf02 100644
@@ -396,6 +396,8 @@ class CookerDataBuilder(object):
                 if c in collections_tmp:
                     bb.fatal("Found duplicated BBFILE_COLLECTIONS '%s', check bblayers.conf or layer.conf to fix it." % c)
                 compat = set((data.getVar("LAYERSERIES_COMPAT_%s" % c) or "").split())
+                if compat and not layerseries:
+                    bb.fatal("No core layer found to work with layer '%s'. Missing entry in bblayers.conf?" % c)
                 if compat and not (compat & layerseries):
                     bb.fatal("Layer %s is not compatible with the core layer which only supports these series: %s (layer is compatible with %s)"
                               % (c, " ".join(layerseries), " ".join(compat)))
Signature · 1 line
2.32.0