* [PATCH v2 0/5] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples
@ 2026-02-16 10:36 Quentin Schulz
2026-02-16 10:36 ` [PATCH v2 1/5] doc: bitbake-user-manual-ref-variables: clarify BBMASK directory matching Quentin Schulz
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Quentin Schulz @ 2026-02-16 10:36 UTC (permalink / raw)
To: bitbake-devel; +Cc: Robert P. J. Day, docs, Quentin Schulz
Robert reported being confused by the leading slash inconsistencies in
our BBMASK examples and wondered if it had any significance. Myself not
being less confused, I went reading the code and testing, and it does
have significance, so this tries to explain the difference and why you
would want a leading slash in most cases.
It also explains that still with only a leading slash there could be
involuntary matches, which one should be able to get rid of by using
BBFILE_PATTERN from the layer they want to mask recipe or append files
from.
While at it, update the meta-ti example such that it matches what's
currently in the repo (migrated in kirkstone from a single meta-ti git
repo layer to a meta-ti git repo with multiple layers, such as
meta-ti-bsp).
This reorganizes examples such that the ones with BBFILE_PATTERN are the
ones we provide as first examples as those are the ones users should
typically be using such that the masks only apply to a specific layer.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
Changes in v2:
- added patch 5,
- completely reorganize patch 3 such that the examples with
BBFILE_PATTERN are the ones provided by default,
- Link to v1: https://patch.msgid.link/20260211-bbmask-slashes-v1-0-b72161c647ef@cherry.de
---
Quentin Schulz (5):
doc: bitbake-user-manual-ref-variables: clarify BBMASK directory matching
doc: bitbake-user-manual-ref-variables: have directory examples be consistent
doc: bitbake-user-manual-ref-variables: expand and reorganize BBMASK explanations
doc: bitbake-user-manual-ref-variables: update BBMASK example with current meta-ti
doc: bitbake-user-manual-ref-variables: update Python re doc link to HTTPS
.../bitbake-user-manual-ref-variables.rst | 91 +++++++++++++++++++---
1 file changed, 80 insertions(+), 11 deletions(-)
---
base-commit: 8b635a400152bb40beaa0d7a47181febb43f5c84
change-id: 20260211-bbmask-slashes-7ea904bf6347
Best regards,
--
Quentin Schulz <quentin.schulz@cherry.de>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/5] doc: bitbake-user-manual-ref-variables: clarify BBMASK directory matching
2026-02-16 10:36 [PATCH v2 0/5] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples Quentin Schulz
@ 2026-02-16 10:36 ` Quentin Schulz
2026-02-16 10:36 ` [PATCH v2 2/5] doc: bitbake-user-manual-ref-variables: have directory examples be consistent Quentin Schulz
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Quentin Schulz @ 2026-02-16 10:36 UTC (permalink / raw)
To: bitbake-devel; +Cc: Robert P. J. Day, docs, Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
BBMASK matches files in the directories matching the regex, and also in
their respective subdirectories, so make that clear in the wording
leading to the example.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
index 4b3b10d46..18bbd638d 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
@@ -1051,8 +1051,8 @@ overview of their function and contents.
documentation at http://docs.python.org/3/library/re.html.
The following example uses a complete regular expression to tell
- BitBake to ignore all recipe and recipe append files in the
- ``meta-ti/recipes-misc/`` directory::
+ BitBake to ignore all recipe and recipe append files in
+ ``meta-ti/recipes-misc/`` directories (and their subdirectories)::
BBMASK = "meta-ti/recipes-misc/"
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/5] doc: bitbake-user-manual-ref-variables: have directory examples be consistent
2026-02-16 10:36 [PATCH v2 0/5] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples Quentin Schulz
2026-02-16 10:36 ` [PATCH v2 1/5] doc: bitbake-user-manual-ref-variables: clarify BBMASK directory matching Quentin Schulz
@ 2026-02-16 10:36 ` Quentin Schulz
2026-02-16 10:36 ` [PATCH v2 3/5] doc: bitbake-user-manual-ref-variables: expand and reorganize BBMASK explanations Quentin Schulz
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Quentin Schulz @ 2026-02-16 10:36 UTC (permalink / raw)
To: bitbake-devel; +Cc: Robert P. J. Day, docs, Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
It's a bit confusing to have a mix of paths with and without a leading
slash. The behavior is actually different. The next commit will explain
when/why to add a leading slash.
Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
index 18bbd638d..f20a9012c 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
@@ -1054,13 +1054,13 @@ overview of their function and contents.
BitBake to ignore all recipe and recipe append files in
``meta-ti/recipes-misc/`` directories (and their subdirectories)::
- BBMASK = "meta-ti/recipes-misc/"
+ BBMASK = "/meta-ti/recipes-misc/"
If you want to mask out multiple directories or recipes, you can
specify multiple regular expression fragments. This next example
masks out multiple directories and individual recipes::
- BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
+ BBMASK += "/meta-ti/recipes-ti/packagegroup/"
BBMASK += "/meta-oe/recipes-support/"
BBMASK += "/meta-foo/.*/openldap"
BBMASK += "opencv.*\.bbappend"
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 3/5] doc: bitbake-user-manual-ref-variables: expand and reorganize BBMASK explanations
2026-02-16 10:36 [PATCH v2 0/5] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples Quentin Schulz
2026-02-16 10:36 ` [PATCH v2 1/5] doc: bitbake-user-manual-ref-variables: clarify BBMASK directory matching Quentin Schulz
2026-02-16 10:36 ` [PATCH v2 2/5] doc: bitbake-user-manual-ref-variables: have directory examples be consistent Quentin Schulz
@ 2026-02-16 10:36 ` Quentin Schulz
2026-02-17 10:18 ` [docs] " Antonin Godard
2026-02-16 10:36 ` [PATCH v2 4/5] doc: bitbake-user-manual-ref-variables: update BBMASK example with current meta-ti Quentin Schulz
2026-02-16 10:36 ` [PATCH v2 5/5] doc: bitbake-user-manual-ref-variables: update Python re doc link to HTTPS Quentin Schulz
4 siblings, 1 reply; 9+ messages in thread
From: Quentin Schulz @ 2026-02-16 10:36 UTC (permalink / raw)
To: bitbake-devel; +Cc: Robert P. J. Day, docs, Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
The documentation doesn't explain the side-effect of putting a leading
slash, only the trailing slash.
The leading slash is not for making the regular expression match an
absolute path, but to force the match on the directory or file that
exactly starts (and ends if there is a trailing slash) with the
specified string. So let's explain that.
This also explains that this doesn't prevent more than the intended path
to be caught, specifically because it is NOT a regular expression
matching an absolute path.
Because any pattern not starting with a ^ character can match multiple
directories from multiple directories, let's make the usage of
BBFILE_PATTERN_my-layer the recommended one. Keep the rest as hints at
what can happen when not using but reiterate what users should be using.
Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
.../bitbake-user-manual-ref-variables.rst | 87 +++++++++++++++++++---
1 file changed, 78 insertions(+), 9 deletions(-)
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
index f20a9012c..06e1112b5 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
@@ -1052,24 +1052,93 @@ overview of their function and contents.
The following example uses a complete regular expression to tell
BitBake to ignore all recipe and recipe append files in
- ``meta-ti/recipes-misc/`` directories (and their subdirectories)::
+ ``recipes-bsp`` directory (recursively) of ``meta-ti``::
- BBMASK = "/meta-ti/recipes-misc/"
+ BBMASK = "${BBFILE_PATTERN_meta-ti}/recipes-bsp/"
If you want to mask out multiple directories or recipes, you can
specify multiple regular expression fragments. This next example
masks out multiple directories and individual recipes::
- BBMASK += "/meta-ti/recipes-ti/packagegroup/"
- BBMASK += "/meta-oe/recipes-support/"
- BBMASK += "/meta-foo/.*/openldap"
- BBMASK += "opencv.*\.bbappend"
- BBMASK += "lzma"
+ BBMASK += "${BBFILE_PATTERN_meta-ti}/recipes-graphics/libgal/"
+ BBMASK += "${BBFILE_PATTERN_openembedded-layer}/recipes-support/"
+ BBMASK += "${BBFILE_PATTERN_openembedded-layer}/.*/openldap"
+ BBMASK += "${BBFILE_PATTERN_meta-ti}/.*/optee.*\.bbappend"
+
+ This masks the ``recipes-graphics/libgal/`` from ``meta-ti``, everything
+ under ``recipes-support`` in ``meta-oe``, every directory or file whose
+ name starts with ``openldap`` in ``meta-oe`` at any directory depth > 1
+ (e.g. in ``meta-oe``, ``recipes-foo/openldap-stuff/`` or
+ ``recipes-bar/baz/openldap_0.1.bb`` but not ``openldap/``), every append
+ file in ``meta-ti`` at any directory depth > 1 (e.g.
+ ``optee/optee-examples_%.bbappend`` and
+ ``recipes-security/optee/optee-client_%.bbappend``).
.. note::
- When specifying a directory name, use the trailing slash character
- to ensure you match just that directory name.
+ Because these are complete regular expressions, if you want to match a
+ directory and not a file, you must end the expression with a trailing
+ slash. That is::
+
+ BBMASK += "${BBFILE_PATTERN_meta-ti}/recipes-graphics/libgal/"
+
+ Will match anything under ``recipes-graphics/ligbal/`` directory of
+ ``meta-ti``. And::
+
+ BBMASK += "${BBFILE_PATTERN_meta-ti}/recipes-graphics/libgal"
+
+ Will match in ``meta-ti`` any file prefixed with ``libgal`` in
+ ``recipes-graphics/`` and any directory (recursively; and its
+ recipes and recipe append files regardless how they are named) prefixed
+ with ``libgal`` in ``recipes-graphics/``. That is, provided your layers
+ are available at ``/build/layers/``, it'll match::
+
+ /builds/layers/meta-ti/recipes-graphics/libgal.bb
+ /builds/layers/meta-ti/recipes-graphics/libgal_%.bbappend
+ /builds/layers/meta-ti/recipes-graphics/libgal-foo/foo.bb
+ /builds/layers/meta-ti/recipes-graphics/libgal-foo/foo/bz.bbappend
+ /builds/layers/meta-ti/recipes-graphics/libgal/bar.bb
+
+ .. note::
+
+ Because these are complete regular expressions, failing to start the
+ pattern with a ``^`` sign (which is usually the first character in
+ :term:`BBFILE_PATTERN`) means it can match *any* portion of a path.
+ Take the following as an example::
+
+ BBMASK = "recipes-graphics/libgal/"
+
+ This will match subdirectories and files in any path containing
+ ``recipes-graphics/libgal/``, meaning (considering your layers are
+ available at ``/builds/layers/``)::
+
+ /builds/layers/meta-ti/recipes-graphics/libgal/
+ /builds/layers/my-layer/foo-recipes-graphics/libgal/
+
+ will be both matched. This may be a more relaxed way of matching
+ directories, recipes and recipe append files from any third party layer
+ but is generally discouraged as it may be casting too wide of a net.
+
+ .. note::
+
+ Because these are complete regular expressions, a leading slash does
+ not mean the path is absolute. It simply forces the directory to be
+ named exactly that. Take::
+
+ BBMASK = "recipes-graphics/libgal/"
+
+ If you happen to have a directory ``foo-recipes-graphics/libgal/``, it
+ will be matched.
+
+ Leading with a slash::
+
+ BBMASK = "/recipes-graphics/libgal/"
+
+ makes sure that doesn't happen. However, this doesn't prevent matching
+ a directory ``recipes-graphics/libgal/`` from another layer.
+
+ Again, we highly recommend using :term:`BBFILE_PATTERN` in the
+ expressions to specify absolute paths specific to one layer.
:term:`BBMULTICONFIG`
Enables BitBake to perform multiple configuration builds and lists
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 4/5] doc: bitbake-user-manual-ref-variables: update BBMASK example with current meta-ti
2026-02-16 10:36 [PATCH v2 0/5] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples Quentin Schulz
` (2 preceding siblings ...)
2026-02-16 10:36 ` [PATCH v2 3/5] doc: bitbake-user-manual-ref-variables: expand and reorganize BBMASK explanations Quentin Schulz
@ 2026-02-16 10:36 ` Quentin Schulz
2026-02-16 10:36 ` [PATCH v2 5/5] doc: bitbake-user-manual-ref-variables: update Python re doc link to HTTPS Quentin Schulz
4 siblings, 0 replies; 9+ messages in thread
From: Quentin Schulz @ 2026-02-16 10:36 UTC (permalink / raw)
To: bitbake-devel; +Cc: Robert P. J. Day, docs, Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
meta-ti git repo now has multiple layers in it since kirkstone, so let's
update the examples to match the current state of meta-ti by using
meta-ti-bsp.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
.../bitbake-user-manual-ref-variables.rst | 32 +++++++++++-----------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
index 06e1112b5..9daf8223d 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
@@ -1052,25 +1052,25 @@ overview of their function and contents.
The following example uses a complete regular expression to tell
BitBake to ignore all recipe and recipe append files in
- ``recipes-bsp`` directory (recursively) of ``meta-ti``::
+ ``recipes-bsp`` directory (recursively) of ``meta-ti-bsp``::
- BBMASK = "${BBFILE_PATTERN_meta-ti}/recipes-bsp/"
+ BBMASK = "${BBFILE_PATTERN_meta-ti-bsp}/recipes-bsp/"
If you want to mask out multiple directories or recipes, you can
specify multiple regular expression fragments. This next example
masks out multiple directories and individual recipes::
- BBMASK += "${BBFILE_PATTERN_meta-ti}/recipes-graphics/libgal/"
+ BBMASK += "${BBFILE_PATTERN_meta-ti-bsp}/recipes-graphics/libgal/"
BBMASK += "${BBFILE_PATTERN_openembedded-layer}/recipes-support/"
BBMASK += "${BBFILE_PATTERN_openembedded-layer}/.*/openldap"
- BBMASK += "${BBFILE_PATTERN_meta-ti}/.*/optee.*\.bbappend"
+ BBMASK += "${BBFILE_PATTERN_meta-ti-bsp}/.*/optee.*\.bbappend"
- This masks the ``recipes-graphics/libgal/`` from ``meta-ti``, everything
+ This masks the ``recipes-graphics/libgal/`` from ``meta-ti-bsp``, everything
under ``recipes-support`` in ``meta-oe``, every directory or file whose
name starts with ``openldap`` in ``meta-oe`` at any directory depth > 1
(e.g. in ``meta-oe``, ``recipes-foo/openldap-stuff/`` or
``recipes-bar/baz/openldap_0.1.bb`` but not ``openldap/``), every append
- file in ``meta-ti`` at any directory depth > 1 (e.g.
+ file in ``meta-ti-bsp`` at any directory depth > 1 (e.g.
``optee/optee-examples_%.bbappend`` and
``recipes-security/optee/optee-client_%.bbappend``).
@@ -1080,24 +1080,24 @@ overview of their function and contents.
directory and not a file, you must end the expression with a trailing
slash. That is::
- BBMASK += "${BBFILE_PATTERN_meta-ti}/recipes-graphics/libgal/"
+ BBMASK += "${BBFILE_PATTERN_meta-ti-bsp}/recipes-graphics/libgal/"
Will match anything under ``recipes-graphics/ligbal/`` directory of
- ``meta-ti``. And::
+ ``meta-ti-bsp``. And::
- BBMASK += "${BBFILE_PATTERN_meta-ti}/recipes-graphics/libgal"
+ BBMASK += "${BBFILE_PATTERN_meta-ti-bsp}/recipes-graphics/libgal"
- Will match in ``meta-ti`` any file prefixed with ``libgal`` in
+ Will match in ``meta-ti-bsp`` any file prefixed with ``libgal`` in
``recipes-graphics/`` and any directory (recursively; and its
recipes and recipe append files regardless how they are named) prefixed
with ``libgal`` in ``recipes-graphics/``. That is, provided your layers
are available at ``/build/layers/``, it'll match::
- /builds/layers/meta-ti/recipes-graphics/libgal.bb
- /builds/layers/meta-ti/recipes-graphics/libgal_%.bbappend
- /builds/layers/meta-ti/recipes-graphics/libgal-foo/foo.bb
- /builds/layers/meta-ti/recipes-graphics/libgal-foo/foo/bz.bbappend
- /builds/layers/meta-ti/recipes-graphics/libgal/bar.bb
+ /builds/layers/meta-ti/meta-ti-bsp/recipes-graphics/libgal.bb
+ /builds/layers/meta-ti/meta-ti-bsp/recipes-graphics/libgal_%.bbappend
+ /builds/layers/meta-ti/meta-ti-bsp/recipes-graphics/libgal-foo/foo.bb
+ /builds/layers/meta-ti/meta-ti-bsp/recipes-graphics/libgal-foo/foo/bz.bbappend
+ /builds/layers/meta-ti/meta-ti-bsp/recipes-graphics/libgal/bar.bb
.. note::
@@ -1112,7 +1112,7 @@ overview of their function and contents.
``recipes-graphics/libgal/``, meaning (considering your layers are
available at ``/builds/layers/``)::
- /builds/layers/meta-ti/recipes-graphics/libgal/
+ /builds/layers/meta-ti/meta-ti-bsp/recipes-graphics/libgal/
/builds/layers/my-layer/foo-recipes-graphics/libgal/
will be both matched. This may be a more relaxed way of matching
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 5/5] doc: bitbake-user-manual-ref-variables: update Python re doc link to HTTPS
2026-02-16 10:36 [PATCH v2 0/5] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples Quentin Schulz
` (3 preceding siblings ...)
2026-02-16 10:36 ` [PATCH v2 4/5] doc: bitbake-user-manual-ref-variables: update BBMASK example with current meta-ti Quentin Schulz
@ 2026-02-16 10:36 ` Quentin Schulz
4 siblings, 0 replies; 9+ messages in thread
From: Quentin Schulz @ 2026-02-16 10:36 UTC (permalink / raw)
To: bitbake-devel; +Cc: Robert P. J. Day, docs, Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
It's 2026, use HTTPS for the link.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
index 9daf8223d..e424bd040 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
@@ -1048,7 +1048,7 @@ overview of their function and contents.
compiler. Consequently, the syntax follows Python's Regular
Expression (re) syntax. The expressions are compared against the full
paths to the files. For complete syntax information, see Python's
- documentation at http://docs.python.org/3/library/re.html.
+ documentation at https://docs.python.org/3/library/re.html.
The following example uses a complete regular expression to tell
BitBake to ignore all recipe and recipe append files in
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [docs] [PATCH v2 3/5] doc: bitbake-user-manual-ref-variables: expand and reorganize BBMASK explanations
2026-02-16 10:36 ` [PATCH v2 3/5] doc: bitbake-user-manual-ref-variables: expand and reorganize BBMASK explanations Quentin Schulz
@ 2026-02-17 10:18 ` Antonin Godard
2026-02-17 11:52 ` Quentin Schulz
0 siblings, 1 reply; 9+ messages in thread
From: Antonin Godard @ 2026-02-17 10:18 UTC (permalink / raw)
To: foss, bitbake-devel; +Cc: Robert P. J. Day, docs, Quentin Schulz
Hi,
On Mon Feb 16, 2026 at 11:36 AM CET, Quentin Schulz via lists.yoctoproject.org wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> The documentation doesn't explain the side-effect of putting a leading
> slash, only the trailing slash.
>
> The leading slash is not for making the regular expression match an
> absolute path, but to force the match on the directory or file that
> exactly starts (and ends if there is a trailing slash) with the
> specified string. So let's explain that.
>
> This also explains that this doesn't prevent more than the intended path
> to be caught, specifically because it is NOT a regular expression
> matching an absolute path.
>
> Because any pattern not starting with a ^ character can match multiple
> directories from multiple directories, let's make the usage of
> BBFILE_PATTERN_my-layer the recommended one. Keep the rest as hints at
> what can happen when not using but reiterate what users should be using.
>
> Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
> ---
> .../bitbake-user-manual-ref-variables.rst | 87 +++++++++++++++++++---
> 1 file changed, 78 insertions(+), 9 deletions(-)
>
> diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
> index f20a9012c..06e1112b5 100644
> --- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
> +++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
> @@ -1052,24 +1052,93 @@ overview of their function and contents.
>
> The following example uses a complete regular expression to tell
> BitBake to ignore all recipe and recipe append files in
> - ``meta-ti/recipes-misc/`` directories (and their subdirectories)::
> + ``recipes-bsp`` directory (recursively) of ``meta-ti``::
>
> - BBMASK = "/meta-ti/recipes-misc/"
> + BBMASK = "${BBFILE_PATTERN_meta-ti}/recipes-bsp/"
>
> If you want to mask out multiple directories or recipes, you can
> specify multiple regular expression fragments. This next example
> masks out multiple directories and individual recipes::
>
> - BBMASK += "/meta-ti/recipes-ti/packagegroup/"
> - BBMASK += "/meta-oe/recipes-support/"
> - BBMASK += "/meta-foo/.*/openldap"
> - BBMASK += "opencv.*\.bbappend"
> - BBMASK += "lzma"
> + BBMASK += "${BBFILE_PATTERN_meta-ti}/recipes-graphics/libgal/"
> + BBMASK += "${BBFILE_PATTERN_openembedded-layer}/recipes-support/"
> + BBMASK += "${BBFILE_PATTERN_openembedded-layer}/.*/openldap"
> + BBMASK += "${BBFILE_PATTERN_meta-ti}/.*/optee.*\.bbappend"
> +
> + This masks the ``recipes-graphics/libgal/`` from ``meta-ti``, everything
> + under ``recipes-support`` in ``meta-oe``, every directory or file whose
> + name starts with ``openldap`` in ``meta-oe`` at any directory depth > 1
> + (e.g. in ``meta-oe``, ``recipes-foo/openldap-stuff/`` or
> + ``recipes-bar/baz/openldap_0.1.bb`` but not ``openldap/``), every append
> + file in ``meta-ti`` at any directory depth > 1 (e.g.
s/every append file/every append file starting with ``optee``/ ?
> + ``optee/optee-examples_%.bbappend`` and
> + ``recipes-security/optee/optee-client_%.bbappend``).
>
> .. note::
>
> - When specifying a directory name, use the trailing slash character
> - to ensure you match just that directory name.
> + Because these are complete regular expressions, if you want to match a
> + directory and not a file, you must end the expression with a trailing
> + slash. That is::
> +
> + BBMASK += "${BBFILE_PATTERN_meta-ti}/recipes-graphics/libgal/"
> +
> + Will match anything under ``recipes-graphics/ligbal/`` directory of
> + ``meta-ti``. And::
> +
> + BBMASK += "${BBFILE_PATTERN_meta-ti}/recipes-graphics/libgal"
> +
> + Will match in ``meta-ti`` any file prefixed with ``libgal`` in
> + ``recipes-graphics/`` and any directory (recursively; and its
> + recipes and recipe append files regardless how they are named) prefixed
> + with ``libgal`` in ``recipes-graphics/``. That is, provided your layers
> + are available at ``/build/layers/``, it'll match::
s/build/builds/
Looks good otherwise, thanks for the reorganization!
Antonin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [docs] [PATCH v2 3/5] doc: bitbake-user-manual-ref-variables: expand and reorganize BBMASK explanations
2026-02-17 10:18 ` [docs] " Antonin Godard
@ 2026-02-17 11:52 ` Quentin Schulz
2026-02-17 12:13 ` Antonin Godard
0 siblings, 1 reply; 9+ messages in thread
From: Quentin Schulz @ 2026-02-17 11:52 UTC (permalink / raw)
To: Antonin Godard, foss, bitbake-devel; +Cc: Robert P. J. Day, docs
Hi Antonin,
On 2/17/26 11:18 AM, Antonin Godard wrote:
> Hi,
>
> On Mon Feb 16, 2026 at 11:36 AM CET, Quentin Schulz via lists.yoctoproject.org wrote:
>> From: Quentin Schulz <quentin.schulz@cherry.de>
>>
>> The documentation doesn't explain the side-effect of putting a leading
>> slash, only the trailing slash.
>>
>> The leading slash is not for making the regular expression match an
>> absolute path, but to force the match on the directory or file that
>> exactly starts (and ends if there is a trailing slash) with the
>> specified string. So let's explain that.
>>
>> This also explains that this doesn't prevent more than the intended path
>> to be caught, specifically because it is NOT a regular expression
>> matching an absolute path.
>>
>> Because any pattern not starting with a ^ character can match multiple
>> directories from multiple directories, let's make the usage of
>> BBFILE_PATTERN_my-layer the recommended one. Keep the rest as hints at
>> what can happen when not using but reiterate what users should be using.
>>
>> Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
>> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
>> ---
>> .../bitbake-user-manual-ref-variables.rst | 87 +++++++++++++++++++---
>> 1 file changed, 78 insertions(+), 9 deletions(-)
>>
>> diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
>> index f20a9012c..06e1112b5 100644
>> --- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
>> +++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
>> @@ -1052,24 +1052,93 @@ overview of their function and contents.
>>
>> The following example uses a complete regular expression to tell
>> BitBake to ignore all recipe and recipe append files in
>> - ``meta-ti/recipes-misc/`` directories (and their subdirectories)::
>> + ``recipes-bsp`` directory (recursively) of ``meta-ti``::
>>
>> - BBMASK = "/meta-ti/recipes-misc/"
>> + BBMASK = "${BBFILE_PATTERN_meta-ti}/recipes-bsp/"
>>
>> If you want to mask out multiple directories or recipes, you can
>> specify multiple regular expression fragments. This next example
>> masks out multiple directories and individual recipes::
>>
>> - BBMASK += "/meta-ti/recipes-ti/packagegroup/"
>> - BBMASK += "/meta-oe/recipes-support/"
>> - BBMASK += "/meta-foo/.*/openldap"
>> - BBMASK += "opencv.*\.bbappend"
>> - BBMASK += "lzma"
>> + BBMASK += "${BBFILE_PATTERN_meta-ti}/recipes-graphics/libgal/"
>> + BBMASK += "${BBFILE_PATTERN_openembedded-layer}/recipes-support/"
>> + BBMASK += "${BBFILE_PATTERN_openembedded-layer}/.*/openldap"
>> + BBMASK += "${BBFILE_PATTERN_meta-ti}/.*/optee.*\.bbappend"
>> +
>> + This masks the ``recipes-graphics/libgal/`` from ``meta-ti``, everything
>> + under ``recipes-support`` in ``meta-oe``, every directory or file whose
>> + name starts with ``openldap`` in ``meta-oe`` at any directory depth > 1
>> + (e.g. in ``meta-oe``, ``recipes-foo/openldap-stuff/`` or
>> + ``recipes-bar/baz/openldap_0.1.bb`` but not ``openldap/``), every append
>> + file in ``meta-ti`` at any directory depth > 1 (e.g.
>
> s/every append file/every append file starting with ``optee``/ ?
>
I'm going for:
every append file whose name starts with ``optee`` in
does that work for you?
>> + ``optee/optee-examples_%.bbappend`` and
>> + ``recipes-security/optee/optee-client_%.bbappend``).
>>
>> .. note::
>>
>> - When specifying a directory name, use the trailing slash character
>> - to ensure you match just that directory name.
>> + Because these are complete regular expressions, if you want to match a
>> + directory and not a file, you must end the expression with a trailing
>> + slash. That is::
>> +
>> + BBMASK += "${BBFILE_PATTERN_meta-ti}/recipes-graphics/libgal/"
>> +
>> + Will match anything under ``recipes-graphics/ligbal/`` directory of
>> + ``meta-ti``. And::
>> +
>> + BBMASK += "${BBFILE_PATTERN_meta-ti}/recipes-graphics/libgal"
>> +
>> + Will match in ``meta-ti`` any file prefixed with ``libgal`` in
>> + ``recipes-graphics/`` and any directory (recursively; and its
>> + recipes and recipe append files regardless how they are named) prefixed
>> + with ``libgal`` in ``recipes-graphics/``. That is, provided your layers
>> + are available at ``/build/layers/``, it'll match::
>
> s/build/builds/
>
Mmmm.. Now to come to think of it, should I use
/bitbake-builds/poky-master-poky-distro_poky-machine_qemux86-64/layers/
instead? It would match the instructions in
doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst (but
it'll make for very long lines :/).
Cheers,
Quentin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [docs] [PATCH v2 3/5] doc: bitbake-user-manual-ref-variables: expand and reorganize BBMASK explanations
2026-02-17 11:52 ` Quentin Schulz
@ 2026-02-17 12:13 ` Antonin Godard
0 siblings, 0 replies; 9+ messages in thread
From: Antonin Godard @ 2026-02-17 12:13 UTC (permalink / raw)
To: Quentin Schulz, foss, bitbake-devel; +Cc: Robert P. J. Day, docs
Hi,
On Tue Feb 17, 2026 at 12:52 PM CET, Quentin Schulz wrote:
> Hi Antonin,
>
> On 2/17/26 11:18 AM, Antonin Godard wrote:
>> Hi,
>>
>> On Mon Feb 16, 2026 at 11:36 AM CET, Quentin Schulz via lists.yoctoproject.org wrote:
>>> From: Quentin Schulz <quentin.schulz@cherry.de>
>>>
>>> The documentation doesn't explain the side-effect of putting a leading
>>> slash, only the trailing slash.
>>>
>>> The leading slash is not for making the regular expression match an
>>> absolute path, but to force the match on the directory or file that
>>> exactly starts (and ends if there is a trailing slash) with the
>>> specified string. So let's explain that.
>>>
>>> This also explains that this doesn't prevent more than the intended path
>>> to be caught, specifically because it is NOT a regular expression
>>> matching an absolute path.
>>>
>>> Because any pattern not starting with a ^ character can match multiple
>>> directories from multiple directories, let's make the usage of
>>> BBFILE_PATTERN_my-layer the recommended one. Keep the rest as hints at
>>> what can happen when not using but reiterate what users should be using.
>>>
>>> Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
>>> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
>>> ---
>>> .../bitbake-user-manual-ref-variables.rst | 87 +++++++++++++++++++---
>>> 1 file changed, 78 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
>>> index f20a9012c..06e1112b5 100644
>>> --- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
>>> +++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
>>> @@ -1052,24 +1052,93 @@ overview of their function and contents.
>>>
>>> The following example uses a complete regular expression to tell
>>> BitBake to ignore all recipe and recipe append files in
>>> - ``meta-ti/recipes-misc/`` directories (and their subdirectories)::
>>> + ``recipes-bsp`` directory (recursively) of ``meta-ti``::
>>>
>>> - BBMASK = "/meta-ti/recipes-misc/"
>>> + BBMASK = "${BBFILE_PATTERN_meta-ti}/recipes-bsp/"
>>>
>>> If you want to mask out multiple directories or recipes, you can
>>> specify multiple regular expression fragments. This next example
>>> masks out multiple directories and individual recipes::
>>>
>>> - BBMASK += "/meta-ti/recipes-ti/packagegroup/"
>>> - BBMASK += "/meta-oe/recipes-support/"
>>> - BBMASK += "/meta-foo/.*/openldap"
>>> - BBMASK += "opencv.*\.bbappend"
>>> - BBMASK += "lzma"
>>> + BBMASK += "${BBFILE_PATTERN_meta-ti}/recipes-graphics/libgal/"
>>> + BBMASK += "${BBFILE_PATTERN_openembedded-layer}/recipes-support/"
>>> + BBMASK += "${BBFILE_PATTERN_openembedded-layer}/.*/openldap"
>>> + BBMASK += "${BBFILE_PATTERN_meta-ti}/.*/optee.*\.bbappend"
>>> +
>>> + This masks the ``recipes-graphics/libgal/`` from ``meta-ti``, everything
>>> + under ``recipes-support`` in ``meta-oe``, every directory or file whose
>>> + name starts with ``openldap`` in ``meta-oe`` at any directory depth > 1
>>> + (e.g. in ``meta-oe``, ``recipes-foo/openldap-stuff/`` or
>>> + ``recipes-bar/baz/openldap_0.1.bb`` but not ``openldap/``), every append
>>> + file in ``meta-ti`` at any directory depth > 1 (e.g.
>>
>> s/every append file/every append file starting with ``optee``/ ?
>>
>
> I'm going for:
>
> every append file whose name starts with ``optee`` in
>
> does that work for you?
Works for me!
>>> + ``optee/optee-examples_%.bbappend`` and
>>> + ``recipes-security/optee/optee-client_%.bbappend``).
>>>
>>> .. note::
>>>
>>> - When specifying a directory name, use the trailing slash character
>>> - to ensure you match just that directory name.
>>> + Because these are complete regular expressions, if you want to match a
>>> + directory and not a file, you must end the expression with a trailing
>>> + slash. That is::
>>> +
>>> + BBMASK += "${BBFILE_PATTERN_meta-ti}/recipes-graphics/libgal/"
>>> +
>>> + Will match anything under ``recipes-graphics/ligbal/`` directory of
>>> + ``meta-ti``. And::
>>> +
>>> + BBMASK += "${BBFILE_PATTERN_meta-ti}/recipes-graphics/libgal"
>>> +
>>> + Will match in ``meta-ti`` any file prefixed with ``libgal`` in
>>> + ``recipes-graphics/`` and any directory (recursively; and its
>>> + recipes and recipe append files regardless how they are named) prefixed
>>> + with ``libgal`` in ``recipes-graphics/``. That is, provided your layers
>>> + are available at ``/build/layers/``, it'll match::
>>
>> s/build/builds/
>>
>
> Mmmm.. Now to come to think of it, should I use
>
> /bitbake-builds/poky-master-poky-distro_poky-machine_qemux86-64/layers/
I think the default name should be "poky-master" now (doc needs an update).
> instead? It would match the instructions in
> doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst (but
> it'll make for very long lines :/).
So /bitbake-builds/poky-master/layers/ is reasonable I think
Antonin
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-02-17 12:13 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-16 10:36 [PATCH v2 0/5] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples Quentin Schulz
2026-02-16 10:36 ` [PATCH v2 1/5] doc: bitbake-user-manual-ref-variables: clarify BBMASK directory matching Quentin Schulz
2026-02-16 10:36 ` [PATCH v2 2/5] doc: bitbake-user-manual-ref-variables: have directory examples be consistent Quentin Schulz
2026-02-16 10:36 ` [PATCH v2 3/5] doc: bitbake-user-manual-ref-variables: expand and reorganize BBMASK explanations Quentin Schulz
2026-02-17 10:18 ` [docs] " Antonin Godard
2026-02-17 11:52 ` Quentin Schulz
2026-02-17 12:13 ` Antonin Godard
2026-02-16 10:36 ` [PATCH v2 4/5] doc: bitbake-user-manual-ref-variables: update BBMASK example with current meta-ti Quentin Schulz
2026-02-16 10:36 ` [PATCH v2 5/5] doc: bitbake-user-manual-ref-variables: update Python re doc link to HTTPS Quentin Schulz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox