From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Qi.Chen@windriver.com, bitbake-devel@lists.openembedded.org
Cc: alex.kanavin@gmail.com
Subject: Re: [bitbake-devel][PATCH V2] lib/bb/parse/ast.py: error out for internal fragment in case of a previous value
Date: Fri, 14 Nov 2025 12:14:26 +0000 [thread overview]
Message-ID: <74af9f38baceead07ed102aef4559b6b01612c0e.camel@linuxfoundation.org> (raw)
In-Reply-To: <20251114060211.1742728-1-Qi.Chen@windriver.com>
On Fri, 2025-11-14 at 14:02 +0800, Qi.Chen@windriver.com wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
>
> When an internal fragment is enabled, and there's already a value
> for the corresponding variable, we should error out to avoid any
> confusion.
>
> For example, when 'machine/qemux86-64' fragement is enabled, and
> we get some "MACHINE = xxx" in local.conf or env, we should error
> out and recomment users to use 'bitbake-config-build disable-fragment'.
>
> We should be tolerating weak assignments. For example, DISTRO defaults
> to "nodistro", and when 'distro/poky" fragment is enabled, there should
> be no confusion.
>
> The implementation hacks the environment variable as a way to tell
> bitbake that we're using 'bitbake-config-build'. Because we recommend
> users to use bitbake-config-build, then it should not error out.
>
> Fixes [YOCTO #16060]
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
> bin/bitbake-layers | 3 +++
> lib/bb/parse/ast.py | 7 +++++++
> 2 files changed, 10 insertions(+)
Thanks, I think this is a step in the right direction but I can see the
challenge you're facing with the parsing. There are probably other bugs
in this area, for example what if there is an invalid fragment set (you
delete a fragment file, then try to disable it with bitbake-build-
config?).
What might be a slightly "nicer" approach would be to pass the toolname
into the bitbake datastore as some variable (BB_TOOLNAME?) from
tinfoil, then we might want to skip all of the fragment code if
bitbake-config-build is in use?
We'd have to check what other implications that might have, for
example, does bitbake-build-config need a full datastore? What are the
implications for bitbake's cache files and cache file hashes?
Cheers,
Richard
next prev parent reply other threads:[~2025-11-14 12:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-14 6:02 [bitbake-devel][PATCH V2] lib/bb/parse/ast.py: error out for internal fragment in case of a previous value Qi.Chen
2025-11-14 6:15 ` Alexander Kanavin
2025-11-14 6:20 ` ChenQi
2025-11-14 6:28 ` Alexander Kanavin
2025-11-14 6:37 ` ChenQi
2025-11-14 6:49 ` Alexander Kanavin
2025-11-14 7:12 ` ChenQi
2025-11-14 7:17 ` ChenQi
2025-11-14 11:50 ` Alexander Kanavin
2025-11-14 12:14 ` Richard Purdie [this message]
[not found] ` <1877DE8BA2A633E6.930811@lists.openembedded.org>
2025-11-14 12:17 ` Richard Purdie
2025-11-17 2:37 ` ChenQi
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=74af9f38baceead07ed102aef4559b6b01612c0e.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=Qi.Chen@windriver.com \
--cc=alex.kanavin@gmail.com \
--cc=bitbake-devel@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 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.