diff options
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/bblayers/create.py | 7 | ||||
-rw-r--r-- | meta/lib/bblayers/templates/README | 12 | ||||
-rw-r--r-- | meta/lib/bblayers/templates/layer.conf | 16 |
3 files changed, 19 insertions, 16 deletions
diff --git a/meta/lib/bblayers/create.py b/meta/lib/bblayers/create.py index e06949c92b..2ebf151ad1 100644 --- a/meta/lib/bblayers/create.py +++ b/meta/lib/bblayers/create.py | |||
@@ -30,8 +30,10 @@ class CreatePlugin(LayerPlugin): | |||
30 | conf = os.path.join(layerdir, 'conf') | 30 | conf = os.path.join(layerdir, 'conf') |
31 | bb.utils.mkdirhier(conf) | 31 | bb.utils.mkdirhier(conf) |
32 | 32 | ||
33 | layername = os.path.basename(os.path.normpath(args.layerdir)) | ||
34 | |||
33 | # Create the README from templates/README | 35 | # Create the README from templates/README |
34 | readme_template = read_template('README') % (args.layerdir, args.layerdir, args.layerdir, args.layerdir, args.layerdir, args.layerdir) | 36 | readme_template = read_template('README').format(layername=layername) |
35 | readme = os.path.join(layerdir, 'README') | 37 | readme = os.path.join(layerdir, 'README') |
36 | with open(readme, 'w') as fd: | 38 | with open(readme, 'w') as fd: |
37 | fd.write(readme_template) | 39 | fd.write(readme_template) |
@@ -47,7 +49,8 @@ class CreatePlugin(LayerPlugin): | |||
47 | compat = self.tinfoil.config_data.getVar('LAYERSERIES_COMPAT_core') or "" | 49 | compat = self.tinfoil.config_data.getVar('LAYERSERIES_COMPAT_core') or "" |
48 | 50 | ||
49 | # Create the layer.conf from templates/layer.conf | 51 | # Create the layer.conf from templates/layer.conf |
50 | layerconf_template = read_template('layer.conf') % (args.layerdir, args.layerdir, args.layerdir, args.priority, args.layerdir, args.layerdir, compat) | 52 | layerconf_template = read_template('layer.conf').format( |
53 | layername=layername, priority=args.priority, compat=compat) | ||
51 | layerconf = os.path.join(conf, 'layer.conf') | 54 | layerconf = os.path.join(conf, 'layer.conf') |
52 | with open(layerconf, 'w') as fd: | 55 | with open(layerconf, 'w') as fd: |
53 | fd.write(layerconf_template) | 56 | fd.write(layerconf_template) |
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}" |