Skip to contentSkip to conversation

cookerdata: Issue warning if layer doesn't set LAYERSERIES_COMPAT_x

PATCH New Richard Purdie 1 participant 1 message Apr 6, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cookerdata: Issue warning if layer doesn't set LAYERSERIES_COMPAT_x

We'd like layers to set this variable so that we know which layers are compatible with which others, even if the branch is a generic un-updated "master" branch.

Start printing a warning to highlight this issue.

---
 lib/bb/cookerdata.py | 2 ++
 1 file changed, 2 insertions(+)
lib/bb/cookerdata.py +2 -0
index c67f012..5df66e6 100644
@@ -396,6 +396,8 @@ class CookerDataBuilder(object):
                 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)))
+                elif not compat and not data.getVar("BB_WORKERCONTEXT"):
+                    bb.warn("Layer %s should set LAYERSERIES_COMPAT_%s in its conf/layer.conf file to list the core layer names it is compatible with." % (c, c))
 
         if not data.getVar("BBPATH"):
             msg = "The BBPATH variable is not set"
Signature · 1 line
2.7.4