From: "'MOESSBAUER, Felix' via isar-users" <isar-users@googlegroups.com>
To: "Schwarz, Konrad" <konrad.schwarz@siemens.com>,
"isar-users@googlegroups.com" <isar-users@googlegroups.com>,
"wzh@ilbers.de" <wzh@ilbers.de>
Subject: Re: [PATCH] Bitbake: use LAYERDIR_RE when setting BBFILE_PATTERN_x
Date: Wed, 4 Mar 2026 12:47:07 +0000 [thread overview]
Message-ID: <8997d85e0c0f9c60ecf580d9e5d78c00bc98f7a2.camel@siemens.com> (raw)
In-Reply-To: <395d5f33-14be-4865-8469-8b9c10aa65b5@ilbers.de>
On Fri, 2026-01-16 at 17:14 +0100, Zhihang Wei wrote:
> Applied to next, thanks.
>
> Zhihang
>
> On 1/12/26 17:06, 'Schwarz, Konrad' via isar-users wrote:
> > From: Konrad Schwarz <konrad.schwarz@siemens.com>
> >
> > The `BBFILE_PATTERN_x` variables are regular expressions.
> > Hence, regular expression special characters such as `.`
> > need to be protected if intended to be used literally.
> >
> > Bitbake facilitates this by automatically poviding a variant of the
> > `LAYERDIR` variable, `LAYERDIR_RE`, in which all regex special characters
> > are escaped (and are thus interpreted as ordinary characters).
> > `LAYERDIR_RE` should be used instead of `LAYERDIR` in the value
> > of `BBFILE_PATTERN_x`.
> >
> > The Bitbake User Manual consistenly uses `LAYERDIR_RE` when assigning
> > to `BBFILE_PATTERN_x`. see Chapters 7 [1], "Variables Glossary",
> > and 9.4 [2], "The Hello World Example".
> >
> > [1]: https://docs.yoctoproject.org/bitbake/bitbake-user-manual/bitbake-user-manual-ref-variables.html#
> > [2]: https://docs.yoctoproject.org/bitbake/bitbake-user-manual/bitbake-user-manual-hello.html#the-hello-world-example
> >
> > Note that this is a systematic mistake. Although
> > this patch addressse Isar, projects based on Isar
> > are likely to contain this mistake in their own layer configurations.
> >
> > `BBFILE_PATTERN_x`/`LAYERDIR_RE` are the only
> > such pair in Bitbake documented in the user's manual;
> > the problem should not extend to other variable uses.
> >
> > Signed-off-by: Konrad Schwarz <konrad.schwarz@siemens.com>
> > ---
> > bitbake/lib/layerindexlib/tests/testdata/layer1/conf/layer.conf | 2 +-
> > bitbake/lib/layerindexlib/tests/testdata/layer2/conf/layer.conf | 2 +-
> > bitbake/lib/layerindexlib/tests/testdata/layer3/conf/layer.conf | 2 +-
> > bitbake/lib/layerindexlib/tests/testdata/layer4/conf/layer.conf | 2 +-
We must not change bitbake, as this is a 1:1 copy-in of the upstream
stable branch. I will send a partial revert of this patch to restore
the bitbake dir.
The rest of the patch is fine.
PS: I noticed this while debugging the missing parser error on
exceptions when running on a trixie host. As this is IMHO release
critical, I consider updating bitbake to the next patch release (2.8.0
-> 2.8.1) which fixes the issue.
Felix
> > meta-isar/conf/layer.conf | 2 +-
> > meta-test/conf/layer.conf | 2 +-
> > meta/conf/layer.conf | 2 +-
> > testsuite/cibuilder.py | 2 +-
> > 8 files changed, 8 insertions(+), 8 deletions(-)
> >
--
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/8997d85e0c0f9c60ecf580d9e5d78c00bc98f7a2.camel%40siemens.com.
prev parent reply other threads:[~2026-03-04 12:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 16:06 'Schwarz, Konrad' via isar-users
2026-01-13 12:05 ` 'MOESSBAUER, Felix' via isar-users
2026-01-16 16:14 ` Zhihang Wei
2026-03-04 12:47 ` 'MOESSBAUER, Felix' via isar-users [this message]
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=8997d85e0c0f9c60ecf580d9e5d78c00bc98f7a2.camel@siemens.com \
--to=isar-users@googlegroups.com \
--cc=felix.moessbauer@siemens.com \
--cc=konrad.schwarz@siemens.com \
--cc=wzh@ilbers.de \
/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