summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2018-06-11 16:29:01 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-17 08:37:49 +0100
commit7fe7a1229daca9b97604050dde507c8a5355d77d (patch)
tree7f090543d210313cd79343b4f71b9de609cb3ab7
parent86b8280394dcf624d7cf96637f48948d89e6df94 (diff)
downloadopenembedded-core-contrib-7fe7a1229daca9b97604050dde507c8a5355d77d.tar.gz
openembedded-core-contrib-7fe7a1229daca9b97604050dde507c8a5355d77d.tar.bz2
openembedded-core-contrib-7fe7a1229daca9b97604050dde507c8a5355d77d.zip
bitbake-layers/create: add LAYERSERIES_COMPAT
Derive the value for template layer.conf from core layer and add dependendency on it too. Fixes [YOCTO #12767] Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/bblayers/create.py5
-rw-r--r--meta/lib/bblayers/templates/layer.conf3
2 files changed, 7 insertions, 1 deletions
diff --git a/meta/lib/bblayers/create.py b/meta/lib/bblayers/create.py
index c1923166fd..e06949c92b 100644
--- a/meta/lib/bblayers/create.py
+++ b/meta/lib/bblayers/create.py
@@ -43,8 +43,11 @@ class CreatePlugin(LayerPlugin):
license_dst = os.path.join(layerdir, copying)
shutil.copy(license_src, license_dst)
+ # Get the compat value for core layer.
+ compat = self.tinfoil.config_data.getVar('LAYERSERIES_COMPAT_core') or ""
+
# Create the layer.conf from templates/layer.conf
- layerconf_template = read_template('layer.conf') % (args.layerdir, args.layerdir, args.layerdir, args.priority)
+ layerconf_template = read_template('layer.conf') % (args.layerdir, args.layerdir, args.layerdir, args.priority, args.layerdir, args.layerdir, compat)
layerconf = os.path.join(conf, 'layer.conf')
with open(layerconf, 'w') as fd:
fd.write(layerconf_template)
diff --git a/meta/lib/bblayers/templates/layer.conf b/meta/lib/bblayers/templates/layer.conf
index 3c0300226c..49f95cafc8 100644
--- a/meta/lib/bblayers/templates/layer.conf
+++ b/meta/lib/bblayers/templates/layer.conf
@@ -8,3 +8,6 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "%s"
BBFILE_PATTERN_%s = "^${LAYERDIR}/"
BBFILE_PRIORITY_%s = "%s"
+
+LAYERDEPENDS_%s = "core"
+LAYERSERIES_COMPAT_%s = "%s"