summaryrefslogtreecommitdiffstats
path: root/meta/lib/bblayers/create.py
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2018-06-11 09:52:06 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-15 17:56:24 +0100
commit425af487a3f6027c83779e7e229217089fae34a4 (patch)
treee1487fcfd4113ef0399996bfca7b8056a52cfd9b /meta/lib/bblayers/create.py
parent2138f47802fc7508f6264764f5f01df7596e2342 (diff)
downloadpoky-425af487a3f6027c83779e7e229217089fae34a4.tar.gz
bitbake-blayers/create: add version for example recipe
Add version field in recipe name for example recipe created by bitbake-layers. Fixes [YOCTO #12767] (From OE-Core rev: c62f6b9643d31b465ea0e919882e411a5ed35c56) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/bblayers/create.py')
-rw-r--r--meta/lib/bblayers/create.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/lib/bblayers/create.py b/meta/lib/bblayers/create.py
index 6a41fe0504..c1923166fd 100644
--- a/meta/lib/bblayers/create.py
+++ b/meta/lib/bblayers/create.py
@@ -53,7 +53,7 @@ class CreatePlugin(LayerPlugin):
53 example_template = read_template('example.bb') 53 example_template = read_template('example.bb')
54 example = os.path.join(layerdir, 'recipes-' + args.examplerecipe, args.examplerecipe) 54 example = os.path.join(layerdir, 'recipes-' + args.examplerecipe, args.examplerecipe)
55 bb.utils.mkdirhier(example) 55 bb.utils.mkdirhier(example)
56 with open(os.path.join(example, args.examplerecipe + '.bb'), 'w') as fd: 56 with open(os.path.join(example, args.examplerecipe + '_%s.bb') % args.version, 'w') as fd:
57 fd.write(example_template) 57 fd.write(example_template)
58 58
59 logger.plain('Add your new layer with \'bitbake-layers add-layer %s\'' % args.layerdir) 59 logger.plain('Add your new layer with \'bitbake-layers add-layer %s\'' % args.layerdir)
@@ -63,4 +63,5 @@ class CreatePlugin(LayerPlugin):
63 parser_create_layer.add_argument('layerdir', help='Layer directory to create') 63 parser_create_layer.add_argument('layerdir', help='Layer directory to create')
64 parser_create_layer.add_argument('--priority', '-p', default=6, help='Layer directory to create') 64 parser_create_layer.add_argument('--priority', '-p', default=6, help='Layer directory to create')
65 parser_create_layer.add_argument('--example-recipe-name', '-e', dest='examplerecipe', default='example', help='Filename of the example recipe') 65 parser_create_layer.add_argument('--example-recipe-name', '-e', dest='examplerecipe', default='example', help='Filename of the example recipe')
66 parser_create_layer.add_argument('--example-recipe-version', '-v', dest='version', default='0.1', help='Version number for the example recipe')
66 67