* [master][dunfell][gatesgarth][PATCH 1/2] bitbake-bblayers/create: Fix incorrect priority help message @ 2021-02-15 20:07 Charlie Davies 2021-02-15 20:07 ` [master][dunfell][gatesgarth][PATCH 2/2] bitbake-bblayers/create: Add optional layerid argument Charlie Davies 2021-03-04 16:43 ` [master][dunfell][gatesgarth][PATCH 1/2] bitbake-bblayers/create: Fix incorrect priority help message Charlie Davies 0 siblings, 2 replies; 4+ messages in thread From: Charlie Davies @ 2021-02-15 20:07 UTC (permalink / raw) To: openembedded-core; +Cc: Charlie Davies The help message for the optional argument of setting the priority of the new layer was incorrect. Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz> --- meta/lib/bblayers/create.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/bblayers/create.py b/meta/lib/bblayers/create.py index 542f31fc81..f49b48d1b4 100644 --- a/meta/lib/bblayers/create.py +++ b/meta/lib/bblayers/create.py @@ -71,7 +71,7 @@ class CreatePlugin(LayerPlugin): def register_commands(self, sp): parser_create_layer = self.add_command(sp, 'create-layer', self.do_create_layer, parserecipes=False) 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('--priority', '-p', default=6, help='Priority of recipes in layer') 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') -- 2.30.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [master][dunfell][gatesgarth][PATCH 2/2] bitbake-bblayers/create: Add optional layerid argument 2021-02-15 20:07 [master][dunfell][gatesgarth][PATCH 1/2] bitbake-bblayers/create: Fix incorrect priority help message Charlie Davies @ 2021-02-15 20:07 ` Charlie Davies 2021-03-04 16:43 ` Charlie Davies 2021-03-04 16:43 ` [master][dunfell][gatesgarth][PATCH 1/2] bitbake-bblayers/create: Fix incorrect priority help message Charlie Davies 1 sibling, 1 reply; 4+ messages in thread From: Charlie Davies @ 2021-02-15 20:07 UTC (permalink / raw) To: openembedded-core; +Cc: Charlie Davies This commit adds an optional layerid argument which can be passed to the bitbake-layers create-layer command. This allows for creation of a layer with a layer id different to that of the layer's name. The default behaviour of the command where the layer's id is set to the layer's name is still retained. Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz> --- meta/lib/bblayers/create.py | 4 +++- meta/lib/bblayers/templates/layer.conf | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/meta/lib/bblayers/create.py b/meta/lib/bblayers/create.py index f49b48d1b4..7ddb777dc7 100644 --- a/meta/lib/bblayers/create.py +++ b/meta/lib/bblayers/create.py @@ -35,6 +35,7 @@ class CreatePlugin(LayerPlugin): bb.utils.mkdirhier(conf) layername = os.path.basename(os.path.normpath(args.layerdir)) + layerid = args.layerid if args.layerid is not None else layername # Create the README from templates/README readme_template = read_template('README').format(layername=layername) @@ -54,7 +55,7 @@ class CreatePlugin(LayerPlugin): # Create the layer.conf from templates/layer.conf layerconf_template = read_template('layer.conf').format( - layername=layername, priority=args.priority, compat=compat) + layerid=layerid, priority=args.priority, compat=compat) layerconf = os.path.join(conf, 'layer.conf') with open(layerconf, 'w') as fd: fd.write(layerconf_template) @@ -71,6 +72,7 @@ class CreatePlugin(LayerPlugin): def register_commands(self, sp): parser_create_layer = self.add_command(sp, 'create-layer', self.do_create_layer, parserecipes=False) parser_create_layer.add_argument('layerdir', help='Layer directory to create') + parser_create_layer.add_argument('--layerid', '-i', help='Layer id to use if different from layername') parser_create_layer.add_argument('--priority', '-p', default=6, help='Priority of recipes in layer') 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') diff --git a/meta/lib/bblayers/templates/layer.conf b/meta/lib/bblayers/templates/layer.conf index e2eaff4346..dddfbf716e 100644 --- a/meta/lib/bblayers/templates/layer.conf +++ b/meta/lib/bblayers/templates/layer.conf @@ -5,9 +5,9 @@ BBPATH .= ":${{LAYERDIR}}" BBFILES += "${{LAYERDIR}}/recipes-*/*/*.bb \ ${{LAYERDIR}}/recipes-*/*/*.bbappend" -BBFILE_COLLECTIONS += "{layername}" -BBFILE_PATTERN_{layername} = "^${{LAYERDIR}}/" -BBFILE_PRIORITY_{layername} = "{priority}" +BBFILE_COLLECTIONS += "{layerid}" +BBFILE_PATTERN_{layerid} = "^${{LAYERDIR}}/" +BBFILE_PRIORITY_{layerid} = "{priority}" -LAYERDEPENDS_{layername} = "core" -LAYERSERIES_COMPAT_{layername} = "{compat}" +LAYERDEPENDS_{layerid} = "core" +LAYERSERIES_COMPAT_{layerid} = "{compat}" -- 2.30.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [master][dunfell][gatesgarth][PATCH 2/2] bitbake-bblayers/create: Add optional layerid argument 2021-02-15 20:07 ` [master][dunfell][gatesgarth][PATCH 2/2] bitbake-bblayers/create: Add optional layerid argument Charlie Davies @ 2021-03-04 16:43 ` Charlie Davies 0 siblings, 0 replies; 4+ messages in thread From: Charlie Davies @ 2021-03-04 16:43 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 71 bytes --] Ping - patch not addressed on first submission. Thanks, Charlie [-- Attachment #2: Type: text/html, Size: 87 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [master][dunfell][gatesgarth][PATCH 1/2] bitbake-bblayers/create: Fix incorrect priority help message 2021-02-15 20:07 [master][dunfell][gatesgarth][PATCH 1/2] bitbake-bblayers/create: Fix incorrect priority help message Charlie Davies 2021-02-15 20:07 ` [master][dunfell][gatesgarth][PATCH 2/2] bitbake-bblayers/create: Add optional layerid argument Charlie Davies @ 2021-03-04 16:43 ` Charlie Davies 1 sibling, 0 replies; 4+ messages in thread From: Charlie Davies @ 2021-03-04 16:43 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 71 bytes --] Ping - patch not addressed on first submission. Thanks, Charlie [-- Attachment #2: Type: text/html, Size: 87 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-03-04 16:43 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-02-15 20:07 [master][dunfell][gatesgarth][PATCH 1/2] bitbake-bblayers/create: Fix incorrect priority help message Charlie Davies 2021-02-15 20:07 ` [master][dunfell][gatesgarth][PATCH 2/2] bitbake-bblayers/create: Add optional layerid argument Charlie Davies 2021-03-04 16:43 ` Charlie Davies 2021-03-04 16:43 ` [master][dunfell][gatesgarth][PATCH 1/2] bitbake-bblayers/create: Fix incorrect priority help message Charlie Davies
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.