[oe-commits] [bitbake] branch master-next updated: cookerdata: Implement LAYERSERIES_COMPAT and LAYERSERIES_CORENAMES

git at git.openembedded.org git at git.openembedded.org
Wed Jun 7 14:59:38 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

The following commit(s) were added to refs/heads/master-next by this push:
     new 723a8aa  cookerdata: Implement LAYERSERIES_COMPAT and LAYERSERIES_CORENAMES
723a8aa is described below

commit 723a8aacef427ebbc67c5f436ebdf98486e486ba
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Jun 7 10:18:49 2017 +0100

    cookerdata: Implement LAYERSERIES_COMPAT and LAYERSERIES_CORENAMES
    
    Currently, someone trying a master branch of any given layer may
    or may not find it works with the version of OE-Core that they
    have picked.
    
    This patchset introduces LAYERSERIES_CORENAMES and
    LAYERSERIES_COMPAT_<layername> with the intention of allowing layers
    to indicate which versions of the core project they're compatible with.
    
    In general the master branch will use the next release codename as
    the value of LAYERSERIES_CORENAMES, meaning that the waterfall model
    of layer releases is supported with layers updating their
    LAYERSERIES_COMPAT_ values as they branch for release.
    
    Both variables support multiple strings and a given layer is accepted
    if there is overlap of any one value. This means a layer can be compatible
    with multiple core versions.
    
    Setting LAYERSERIES_COMPAT_ will be required by the Yocto Project
    Compatible v2 standard but the system will not error if its not set at this
    point.
    
    This should make it clear when a given layer is unmaintained and untested
    with new releaes of OE-Core, a common user pain point.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/cookerdata.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index aa96f54..256e4f3 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -360,6 +360,13 @@ class CookerDataBuilder(object):
             if invalid:
                 bb.fatal("BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not:\n    %s" % "\n    ".join(invalid))
 
+            layerseries = set((data.getVar("LAYERSERIES_CORENAMES") or "").split())
+            for c in collections:
+                compat = set((data.getVar("LAYERSERIES_COMPAT_%s" % c) or "").split())
+                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)))
+
         if not data.getVar("BBPATH"):
             msg = "The BBPATH variable is not set"
             if not layerconf:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list