diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2018-06-28 12:53:41 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-29 11:07:45 +0100 |
commit | 44b1fe43b0e97b1d01b95cd6ce40fbad78e65ab3 (patch) | |
tree | ce88e4936b1de13dd3376c9c79970b18b546dfb3 /meta/lib/bblayers/templates | |
parent | 1dec2101f9603d5340139f24d36c2e9f396eb311 (diff) | |
download | poky-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/README | 12 | ||||
-rw-r--r-- | meta/lib/bblayers/templates/layer.conf | 16 |
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 @@ | |||
1 | This README file contains information on the contents of the %s layer. | 1 | This README file contains information on the contents of the {layername} layer. |
2 | 2 | ||
3 | Please see the corresponding sections below for details. | 3 | Please see the corresponding sections below for details. |
4 | 4 | ||
@@ -18,7 +18,7 @@ Dependencies | |||
18 | Patches | 18 | Patches |
19 | ======= | 19 | ======= |
20 | 20 | ||
21 | Please submit any patches against the %s layer to the xxxx mailing list (xxxx@zzzz.org) | 21 | Please submit any patches against the {layername} layer to the xxxx mailing list (xxxx@zzzz.org) |
22 | and cc: the maintainer: | 22 | and cc: the maintainer: |
23 | 23 | ||
24 | Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com> | 24 | Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com> |
@@ -26,16 +26,16 @@ Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com> | |||
26 | Table of Contents | 26 | Table 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 | ||
33 | I. Adding the %s layer to your build | 33 | I. Adding the {layername} layer to your build |
34 | ================================================= | 34 | ================================================= |
35 | 35 | ||
36 | Run 'bitbake-layers add-layer %s' | 36 | Run 'bitbake-layers add-layer {layername}' |
37 | 37 | ||
38 | II. Misc | 38 | II. 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 |
2 | BBPATH .= ":${LAYERDIR}" | 2 | BBPATH .= ":${{LAYERDIR}}" |
3 | 3 | ||
4 | # We have recipes-* directories, add to BBFILES | 4 | # We have recipes-* directories, add to BBFILES |
5 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ | 5 | BBFILES += "${{LAYERDIR}}/recipes-*/*/*.bb \ |
6 | ${LAYERDIR}/recipes-*/*/*.bbappend" | 6 | ${{LAYERDIR}}/recipes-*/*/*.bbappend" |
7 | 7 | ||
8 | BBFILE_COLLECTIONS += "%s" | 8 | BBFILE_COLLECTIONS += "{layername}" |
9 | BBFILE_PATTERN_%s = "^${LAYERDIR}/" | 9 | BBFILE_PATTERN_{layername} = "^${{LAYERDIR}}/" |
10 | BBFILE_PRIORITY_%s = "%s" | 10 | BBFILE_PRIORITY_{layername} = "{priority}" |
11 | 11 | ||
12 | LAYERDEPENDS_%s = "core" | 12 | LAYERDEPENDS_{layername} = "core" |
13 | LAYERSERIES_COMPAT_%s = "%s" | 13 | LAYERSERIES_COMPAT_{layername} = "{compat}" |