[oe-commits] [openembedded-core] 63/68: bitbake-blayers/create: add version for example recipe
git at git.openembedded.org
git at git.openembedded.org
Mon Jul 2 10:47:25 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch sumo
in repository openembedded-core.
commit 963837bde1c0221333883505cc359e54bf98b10c
Author: Anuj Mittal <anuj.mittal at intel.com>
AuthorDate: Mon Jun 11 09:52:06 2018 +0800
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 at intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
(cherry picked from commit 425af487a3f6027c83779e7e229217089fae34a4)
Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
meta/lib/bblayers/create.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/lib/bblayers/create.py b/meta/lib/bblayers/create.py
index 6a41fe0..c192316 100644
--- a/meta/lib/bblayers/create.py
+++ b/meta/lib/bblayers/create.py
@@ -53,7 +53,7 @@ class CreatePlugin(LayerPlugin):
example_template = read_template('example.bb')
example = os.path.join(layerdir, 'recipes-' + args.examplerecipe, args.examplerecipe)
bb.utils.mkdirhier(example)
- with open(os.path.join(example, args.examplerecipe + '.bb'), 'w') as fd:
+ with open(os.path.join(example, args.examplerecipe + '_%s.bb') % args.version, 'w') as fd:
fd.write(example_template)
logger.plain('Add your new layer with \'bitbake-layers add-layer %s\'' % args.layerdir)
@@ -63,4 +63,5 @@ class CreatePlugin(LayerPlugin):
parser_create_layer.add_argument('layerdir', help='Layer directory to create')
parser_create_layer.add_argument('--priority', '-p', default=6, help='Layer directory to create')
parser_create_layer.add_argument('--example-recipe-name', '-e', dest='examplerecipe', default='example', help='Filename of the example recipe')
+ parser_create_layer.add_argument('--example-recipe-version', '-v', dest='version', default='0.1', help='Version number for the example recipe')
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list