From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: alex.kanavin@gmail.com, openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex@linutronix.de>
Subject: Re: [OE-core] [PATCH v3 3/3] bitbake-config-build: add a plugin for config fragments
Date: Mon, 09 Dec 2024 16:33:08 +0000 [thread overview]
Message-ID: <679f5a4e181f40228fedfd45fb1770c01b00256a.camel@linuxfoundation.org> (raw)
In-Reply-To: <20241118162643.1423409-3-alex.kanavin@gmail.com>
On Mon, 2024-11-18 at 17:26 +0100, Alexander Kanavin via lists.openembedded.org wrote:
> From: Alexander Kanavin <alex@linutronix.de>
>
> This allows fine-tuning local configurations with pre-frabricated
> configuration snippets in a structured, controlled way. It's also
> an important building block for bitbake-setup.
>
> There are three (and a half) operations (list/enable/disable/disable all), and here's the 'list' output:
>
> alex@Zen2:/srv/storage/alex/yocto/build-64$ bitbake-config-build list-fragments
> NOTE: Starting bitbake server...
> Available fragments in selftest layer located in /srv/work/alex/poky/meta-selftest:
>
> selftest/test-fragment (disabled) This is a configuration fragment intended for testing in oe-selftest context
> selftest/more-fragments-here/test-another-fragment (disabled) This is a second configuration fragment intended for testing in oe-selftest context
>
> The tool requires that each fragment contains a one-line summary, and one or more
> lines of description, as BB_CONF_FRAGMENT_SUMMARY[layerid/fragmentname] style metadata.
>
> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> ---
> .../test-another-fragment.conf | 3 +
> .../conf/fragments/test-fragment.conf | 3 +
> meta/lib/bbconfigbuild/configfragments.py | 147 ++++++++++++++++++
> meta/lib/oeqa/selftest/cases/bblayers.py | 31 ++++
> 4 files changed, 184 insertions(+)
> create mode 100644 meta-selftest/conf/fragments/more-fragments-here/test-another-fragment.conf
> create mode 100644 meta-selftest/conf/fragments/test-fragment.conf
> create mode 100644 meta/lib/bbconfigbuild/configfragments.py
>
> diff --git a/meta-selftest/conf/fragments/more-fragments-here/test-another-fragment.conf b/meta-selftest/conf/fragments/more-fragments-here/test-another-fragment.conf
> new file mode 100644
> index 00000000000..cf9ba6a6132
> --- /dev/null
> +++ b/meta-selftest/conf/fragments/more-fragments-here/test-another-fragment.conf
> @@ -0,0 +1,3 @@
> +BB_CONF_FRAGMENT_SUMMARY[selftest/more-fragments-here/test-another-fragment] = "This is a second configuration fragment intended for testing in oe-selftest context"
> +BB_CONF_FRAGMENT_DESCRIPTION[selftest/more-fragments-here/test-another-fragment] = "It defines another variable that can be checked inside the test."
> +SELFTEST_FRAGMENT_ANOTHER_VARIABLE = "someothervalue"
One thing which is still bugging me about this and causing some of my
hesitation to merge things is the repeat of the name in the file path
and in the flag name itself. This is going to be a pain to keep in sync
over time.
I've been wondering if:
a) We should have some of variable that gets expanded. Similar examples
are THIDDIR, LAYERDIR, FILE_DIRNAME and FILE but all those have
problems.
-or-
b) Whether the fragment inclusion code should do a rename of any
BB_CONF_FRAGMENT_SUMMARY -> BB_CONF_FRAGMENT_SUMMARY[<name>] during
parsing. We could list the variables that need processing as parameters
to the addfragments directive or in a variable.
Of the two, I can see b) possibly working. We've never had a) work in a
way that I've liked.
Does anyone have any thoughts on this?
Cheers,
Richard
next prev parent reply other threads:[~2024-12-09 16:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 16:26 [PATCH v3 1/3] patchtest: use HEAD commit as base for the selftest and not master Alexander Kanavin
2024-11-18 16:26 ` [PATCH v3 2/3] bitbake.conf: add an addfragments directive for oe-core and dependent layers Alexander Kanavin
2024-11-18 16:26 ` [PATCH v3 3/3] bitbake-config-build: add a plugin for config fragments Alexander Kanavin
2024-11-18 16:32 ` Patchtest results for " patchtest
2024-12-09 16:33 ` Richard Purdie [this message]
2024-12-10 12:22 ` [OE-core] " Alexander Kanavin
2024-12-09 17:00 ` Richard Purdie
2024-12-10 13:05 ` Alexander Kanavin
2024-12-10 15:27 ` Richard Purdie
2024-12-11 11:24 ` Alexander Kanavin
2024-12-16 16:58 ` Richard Purdie
2024-12-20 17:39 ` Joshua Watt
2024-12-25 15:29 ` Alexander Kanavin
2024-12-25 15:33 ` Joshua Watt
2024-12-27 18:12 ` Joshua Watt
2024-12-27 18:44 ` Alexander Kanavin
2024-12-27 19:47 ` Joshua Watt
2024-11-18 16:33 ` [OE-core] [PATCH v3 1/3] patchtest: use HEAD commit as base for the selftest and not master Trevor Gamblin
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=679f5a4e181f40228fedfd45fb1770c01b00256a.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=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