summaryrefslogtreecommitdiffstats
path: root/meta/lib/bblayers/templates
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2018-06-28 12:53:41 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-29 11:07:45 +0100
commit44b1fe43b0e97b1d01b95cd6ce40fbad78e65ab3 (patch)
treece88e4936b1de13dd3376c9c79970b18b546dfb3 /meta/lib/bblayers/templates
parent1dec2101f9603d5340139f24d36c2e9f396eb311 (diff)
downloadpoky-44b1fe43b0e97b1d01b95cd6ce40fbad78e65ab3.tar.gz
bitbake-bblayers/create: Fix layer name generation
The path to where the layer was being created was taken verbatim as the name of the layer when generating the layer.conf and README files from templates. This causes problems in the layer.conf file because it would result in strangely named variables like BBFILE_PATTERN_../my-layer = "..." Instead of blindly taking the path, use the name of the last component of the path as the layer name. Additionally, rework the template files to use python format strings with named parameters so that the same argument doesn't have to be repeated multiple times. [YOCTO #12808] (From OE-Core rev: 01071c5d524a878d9de4814196cba2f15739796e) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/bblayers/templates')
-rw-r--r--meta/lib/bblayers/templates/README12
-rw-r--r--meta/lib/bblayers/templates/layer.conf16
2 files changed, 14 insertions, 14 deletions
diff --git a/meta/lib/bblayers/templates/README b/meta/lib/bblayers/templates/README
index 5a77f8d347..fb2d28e177 100644
--- a/meta/lib/bblayers/templates/README
+++ b/meta/lib/bblayers/templates/README
@@ -1,4 +1,4 @@
1This README file contains information on the contents of the %s layer. 1This README file contains information on the contents of the {layername} layer.
2 2
3Please see the corresponding sections below for details. 3Please see the corresponding sections below for details.
4 4
@@ -18,7 +18,7 @@ Dependencies
18Patches 18Patches
19======= 19=======
20 20
21Please submit any patches against the %s layer to the xxxx mailing list (xxxx@zzzz.org) 21Please submit any patches against the {layername} layer to the xxxx mailing list (xxxx@zzzz.org)
22and cc: the maintainer: 22and cc: the maintainer:
23 23
24Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com> 24Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com>
@@ -26,16 +26,16 @@ Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com>
26Table of Contents 26Table of Contents
27================= 27=================
28 28
29 I. Adding the %s layer to your build 29 I. Adding the {layername} layer to your build
30 II. Misc 30 II. Misc
31 31
32 32
33I. Adding the %s layer to your build 33I. Adding the {layername} layer to your build
34================================================= 34=================================================
35 35
36Run 'bitbake-layers add-layer %s' 36Run 'bitbake-layers add-layer {layername}'
37 37
38II. Misc 38II. Misc
39======== 39========
40 40
41--- replace with specific information about the %s layer --- 41--- replace with specific information about the {layername} layer ---
diff --git a/meta/lib/bblayers/templates/layer.conf b/meta/lib/bblayers/templates/layer.conf
index 49f95cafc8..e2eaff4346 100644
--- a/meta/lib/bblayers/templates/layer.conf
+++ b/meta/lib/bblayers/templates/layer.conf
@@ -1,13 +1,13 @@
1# We have a conf and classes directory, add to BBPATH 1# We have a conf and classes directory, add to BBPATH
2BBPATH .= ":${LAYERDIR}" 2BBPATH .= ":${{LAYERDIR}}"
3 3
4# We have recipes-* directories, add to BBFILES 4# We have recipes-* directories, add to BBFILES
5BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ 5BBFILES += "${{LAYERDIR}}/recipes-*/*/*.bb \
6 ${LAYERDIR}/recipes-*/*/*.bbappend" 6 ${{LAYERDIR}}/recipes-*/*/*.bbappend"
7 7
8BBFILE_COLLECTIONS += "%s" 8BBFILE_COLLECTIONS += "{layername}"
9BBFILE_PATTERN_%s = "^${LAYERDIR}/" 9BBFILE_PATTERN_{layername} = "^${{LAYERDIR}}/"
10BBFILE_PRIORITY_%s = "%s" 10BBFILE_PRIORITY_{layername} = "{priority}"
11 11
12LAYERDEPENDS_%s = "core" 12LAYERDEPENDS_{layername} = "core"
13LAYERSERIES_COMPAT_%s = "%s" 13LAYERSERIES_COMPAT_{layername} = "{compat}"