From: Alexander Kanavin <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex@linutronix.de>
Subject: [PATCH 2/5] meta/lib/bblayers/buildconf.py: add support for configuration descriptions
Date: Wed, 31 Jan 2024 13:39:05 +0100 [thread overview]
Message-ID: <20240131123908.1098544-2-alex@linutronix.de> (raw)
In-Reply-To: <20240131123908.1098544-1-alex@linutronix.de>
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
meta/lib/bblayers/buildconf.py | 10 ++++++++--
meta/lib/oeqa/selftest/cases/bblayers.py | 2 +-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/meta/lib/bblayers/buildconf.py b/meta/lib/bblayers/buildconf.py
index 87a5e5a55bc..a7d06471df5 100644
--- a/meta/lib/bblayers/buildconf.py
+++ b/meta/lib/bblayers/buildconf.py
@@ -20,7 +20,10 @@ def plugin_init(plugins):
return BuildConfPlugin()
class BuildConfPlugin(LayerPlugin):
- notes_fixme = """FIXME: Please place here the description of this build configuration.
+ notes_fixme = """FIXME: Please place here the detailed instructions for using this build configuration.
+They will be shown to the users when they set up their builds via TEMPLATECONF.
+"""
+ description_fixme = """FIXME: Please place here the short description of what this build configuration is for.
It will be shown to the users when they set up their builds via TEMPLATECONF.
"""
@@ -41,14 +44,17 @@ It will be shown to the users when they set up their builds via TEMPLATECONF.
bblayers_data = bblayers_data.replace(abspath, "##OEROOT##/" + relpath)
dest.write(bblayers_data)
+ with open(os.path.join(destdir, "conf-description.txt"), 'w') as dest:
+ dest.write(self.description_fixme)
with open(os.path.join(destdir, "conf-notes.txt"), 'w') as dest:
dest.write(self.notes_fixme)
logger.info("""Configuration template placed into {}
Please review the files in there, and particularly provide a configuration description in {}
+and notes in {}
You can try out the configuration with
TEMPLATECONF={} . {}/oe-init-build-env build-try-{}"""
-.format(destdir, os.path.join(destdir, "conf-notes.txt"), destdir, oecorepath, templatename))
+.format(destdir, os.path.join(destdir, "conf-description.txt"), os.path.join(destdir, "conf-notes.txt"), destdir, oecorepath, templatename))
def do_save_build_conf(self, args):
""" Save the currently active build configuration (conf/local.conf, conf/bblayers.conf) as a template into a layer.\n This template can later be used for setting up builds via TEMPLATECONF. """
diff --git a/meta/lib/oeqa/selftest/cases/bblayers.py b/meta/lib/oeqa/selftest/cases/bblayers.py
index 8faa0602348..819ddf51bcd 100644
--- a/meta/lib/oeqa/selftest/cases/bblayers.py
+++ b/meta/lib/oeqa/selftest/cases/bblayers.py
@@ -121,7 +121,7 @@ class BitbakeLayers(OESelftestTestCase):
self.assertEqual(bb_vars['BBFILE_PRIORITY_%s' % layername], str(priority), 'BBFILE_PRIORITY_%s != %d' % (layername, priority))
result = runCmd('bitbake-layers save-build-conf {} {}'.format(layerpath, "buildconf-1"))
- for f in ('local.conf.sample', 'bblayers.conf.sample', 'conf-notes.txt'):
+ for f in ('local.conf.sample', 'bblayers.conf.sample', 'conf-description.txt', 'conf-notes.txt'):
fullpath = os.path.join(layerpath, "conf", "templates", "buildconf-1", f)
self.assertTrue(os.path.exists(fullpath), "Template configuration file {} not found".format(fullpath))
--
2.39.2
next prev parent reply other threads:[~2024-01-31 12:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 12:39 [PATCH 1/5] meta/conf/templates/default/conf-description.txt: add a template description Alexander Kanavin
2024-01-31 12:39 ` Alexander Kanavin [this message]
2024-01-31 12:39 ` [PATCH 3/5] scripts/oe-setup-builddir: add support for configuration descriptions Alexander Kanavin
2024-01-31 12:39 ` [PATCH 4/5] scripts/oe-setup-layers: write a list of layer paths into the checkout's top dir Alexander Kanavin
2024-01-31 12:39 ` [PATCH 5/5] oe-setup-build: add a tool for discovering config templates and setting up builds Alexander Kanavin
2024-02-08 13:40 ` Jermain Horsman
2024-02-08 15:54 ` [OE-core] " Alexander Kanavin
2024-02-08 19:07 ` Jermain Horsman
2024-02-15 15:00 ` [OE-core] [PATCH 1/5] meta/conf/templates/default/conf-description.txt: add a template description Richard Purdie
2024-02-16 10:57 ` Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240131123908.1098544-2-alex@linutronix.de \
--to=alex.kanavin@gmail.com \
--cc=alex@linutronix.de \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox