public inbox for docs@lists.yoctoproject.org
 help / color / mirror / Atom feed
* [PATCH 0/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples
@ 2026-02-11 18:06 Quentin Schulz
  2026-02-11 18:06 ` [PATCH 1/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK directory matching Quentin Schulz
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Quentin Schulz @ 2026-02-11 18:06 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. After
reading the code and testing, it does, 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).

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
Quentin Schulz (4):
      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: clarify BBMASK matching patterns
      doc: bitbake-user-manual-ref-variables: update BBMASK example with current meta-ti

 .../bitbake-user-manual-ref-variables.rst          | 30 +++++++++++++++++++---
 1 file changed, 26 insertions(+), 4 deletions(-)
---
base-commit: af9dd012e7f4d16dccd1d6118be5da94ede68f85
change-id: 20260211-bbmask-slashes-7ea904bf6347

Best regards,
--  
Quentin Schulz <quentin.schulz@cherry.de>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK directory matching
  2026-02-11 18:06 [PATCH 0/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples Quentin Schulz
@ 2026-02-11 18:06 ` Quentin Schulz
  2026-02-12  8:49   ` [docs] " Antonin Godard
  2026-02-11 18:06 ` [PATCH 2/4] doc: bitbake-user-manual-ref-variables: have directory examples be consistent Quentin Schulz
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Quentin Schulz @ 2026-02-11 18:06 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] 11+ messages in thread

* [PATCH 2/4] doc: bitbake-user-manual-ref-variables: have directory examples be consistent
  2026-02-11 18:06 [PATCH 0/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples Quentin Schulz
  2026-02-11 18:06 ` [PATCH 1/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK directory matching Quentin Schulz
@ 2026-02-11 18:06 ` Quentin Schulz
  2026-02-11 18:06 ` [PATCH 3/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK matching patterns Quentin Schulz
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Quentin Schulz @ 2026-02-11 18:06 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] 11+ messages in thread

* [PATCH 3/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK matching patterns
  2026-02-11 18:06 [PATCH 0/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples Quentin Schulz
  2026-02-11 18:06 ` [PATCH 1/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK directory matching Quentin Schulz
  2026-02-11 18:06 ` [PATCH 2/4] doc: bitbake-user-manual-ref-variables: have directory examples be consistent Quentin Schulz
@ 2026-02-11 18:06 ` Quentin Schulz
  2026-02-12  8:58   ` [docs] " Antonin Godard
  2026-02-11 18:06 ` [PATCH 4/4] doc: bitbake-user-manual-ref-variables: update BBMASK example with current meta-ti Quentin Schulz
  2026-02-11 20:45 ` [docs] [PATCH 0/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples Robert P. J. Day
  4 siblings, 1 reply; 11+ messages in thread
From: Quentin Schulz @ 2026-02-11 18:06 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.

Finally, this also explains that this still doesn't prevent more than
the intended path to be caught up, specifically because it is NOT a
regular expression matching an absolute path. For that though, the user
can use BBFILE_PATTERN set for the layer they want to mask the recipe or
append files to BitBake. This is typically a regex starting with
^${LAYERDIR}, making it an absolute path matching.

Let's document those limitations.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
 .../bitbake-user-manual-ref-variables.rst          | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

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..6612dcc03 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
@@ -1071,6 +1071,28 @@ overview of their function and contents.
          When specifying a directory name, use the trailing slash character
          to ensure you match just that directory name.
 
+      .. note::
+
+         The leading slash in a regular expression in :term:`BBMASK` does not
+         mean the path is absolute. It simply forces the directory to be named
+         exactly that. Take::
+
+            BBMASK = "meta-ti/recipes-bsp/"
+
+        If you happen to have a directory ``my-meta-ti/recipes-bsp``, it will
+        be matched.
+
+        Leading with a slash::
+
+           BBMASK = "/meta-ti/recipes-bsp/"
+
+        makes sure that doesn't happen. However, this doesn't prevent matching a
+        directory ``meta-foo/meta-ti/recipes-bsp``. For that, use the
+        appropriate :term:`BBFILE_PATTERN` to only match a directory from one
+        specific layer::
+
+           BBMASK = "${BBFILE_PATTERN_meta-ti}/recipes-bsp/"
+
    :term:`BBMULTICONFIG`
       Enables BitBake to perform multiple configuration builds and lists
       each separate configuration (multiconfig). You can use this variable

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/4] doc: bitbake-user-manual-ref-variables: update BBMASK example with current meta-ti
  2026-02-11 18:06 [PATCH 0/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples Quentin Schulz
                   ` (2 preceding siblings ...)
  2026-02-11 18:06 ` [PATCH 3/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK matching patterns Quentin Schulz
@ 2026-02-11 18:06 ` Quentin Schulz
  2026-02-11 20:45 ` [docs] [PATCH 0/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples Robert P. J. Day
  4 siblings, 0 replies; 11+ messages in thread
From: Quentin Schulz @ 2026-02-11 18:06 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                | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 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 6612dcc03..e8563bc97 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
@@ -1052,15 +1052,15 @@ 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)::
+      ``meta-ti-bsp/recipes-ti/`` directories (and their subdirectories)::
 
-         BBMASK = "/meta-ti/recipes-misc/"
+         BBMASK = "/meta-ti-bsp/recipes-ti/"
 
       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-ti-bsp/recipes-graphics/powervr-umlibs/"
          BBMASK += "/meta-oe/recipes-support/"
          BBMASK += "/meta-foo/.*/openldap"
          BBMASK += "opencv.*\.bbappend"
@@ -1077,21 +1077,21 @@ overview of their function and contents.
          mean the path is absolute. It simply forces the directory to be named
          exactly that. Take::
 
-            BBMASK = "meta-ti/recipes-bsp/"
+            BBMASK = "meta-ti-bsp/recipes-ti/"
 
-        If you happen to have a directory ``my-meta-ti/recipes-bsp``, it will
+        If you happen to have a directory ``my-meta-ti-bsp/recipes-ti``, it will
         be matched.
 
         Leading with a slash::
 
-           BBMASK = "/meta-ti/recipes-bsp/"
+           BBMASK = "/meta-ti-bsp/recipes-ti/"
 
         makes sure that doesn't happen. However, this doesn't prevent matching a
-        directory ``meta-foo/meta-ti/recipes-bsp``. For that, use the
+        directory ``meta-foo/meta-ti-bsp/recipes-ti``. For that, use the
         appropriate :term:`BBFILE_PATTERN` to only match a directory from one
         specific layer::
 
-           BBMASK = "${BBFILE_PATTERN_meta-ti}/recipes-bsp/"
+           BBMASK = "${BBFILE_PATTERN_meta-ti-bsp}/recipes-bsp/"
 
    :term:`BBMULTICONFIG`
       Enables BitBake to perform multiple configuration builds and lists

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [docs] [PATCH 0/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples
  2026-02-11 18:06 [PATCH 0/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples Quentin Schulz
                   ` (3 preceding siblings ...)
  2026-02-11 18:06 ` [PATCH 4/4] doc: bitbake-user-manual-ref-variables: update BBMASK example with current meta-ti Quentin Schulz
@ 2026-02-11 20:45 ` Robert P. J. Day
  4 siblings, 0 replies; 11+ messages in thread
From: Robert P. J. Day @ 2026-02-11 20:45 UTC (permalink / raw)
  To: foss; +Cc: bitbake-devel, docs, Quentin Schulz

On Wed, 11 Feb 2026, Quentin Schulz via lists.yoctoproject.org wrote:

> Robert reported being confused by the leading slash inconsistencies
> in our BBMASK examples and wondered if it had any significance.
> After reading the code and testing, it does, so this tries to
> explain the difference and why you would want a leading slash in
> most cases.

  thanks, quentin, for tolerating my relentless whining about stuff
and proceeding to resolve it. i will try to get back to contributing
some of my own stuff in the near future. i already have plenty of
ideas for docs improvement.

rday


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [docs] [PATCH 1/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK directory matching
  2026-02-11 18:06 ` [PATCH 1/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK directory matching Quentin Schulz
@ 2026-02-12  8:49   ` Antonin Godard
  2026-02-12 11:12     ` Quentin Schulz
  0 siblings, 1 reply; 11+ messages in thread
From: Antonin Godard @ 2026-02-12  8:49 UTC (permalink / raw)
  To: foss, bitbake-devel; +Cc: Robert P. J. Day, docs, Quentin Schulz

Hi,

On Wed Feb 11, 2026 at 7:06 PM CET, Quentin Schulz via lists.yoctoproject.org wrote:
> 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)::

If I follow: this will mask multiple occurrences "meta-ti/recipes-misc/". How
could there be more than one in practice? How could this ever happen?

Wouldn't:

"""
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 and its subdirectories::
"""

be less confusing?

Antonin


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [docs] [PATCH 3/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK matching patterns
  2026-02-11 18:06 ` [PATCH 3/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK matching patterns Quentin Schulz
@ 2026-02-12  8:58   ` Antonin Godard
  2026-02-12 11:38     ` Quentin Schulz
  0 siblings, 1 reply; 11+ messages in thread
From: Antonin Godard @ 2026-02-12  8:58 UTC (permalink / raw)
  To: foss, bitbake-devel; +Cc: Robert P. J. Day, docs, Quentin Schulz

Hi,

On Wed Feb 11, 2026 at 7:06 PM 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.
>
> Finally, this also explains that this still doesn't prevent more than
> the intended path to be caught up, specifically because it is NOT a
> regular expression matching an absolute path. For that though, the user
> can use BBFILE_PATTERN set for the layer they want to mask the recipe or
> append files to BitBake. This is typically a regex starting with
> ^${LAYERDIR}, making it an absolute path matching.
>
> Let's document those limitations.
>
> Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
> ---
>  .../bitbake-user-manual-ref-variables.rst          | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>
> 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..6612dcc03 100644
> --- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
> +++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
> @@ -1071,6 +1071,28 @@ overview of their function and contents.
>           When specifying a directory name, use the trailing slash character
>           to ensure you match just that directory name.
>  
> +      .. note::
> +
> +         The leading slash in a regular expression in :term:`BBMASK` does not
> +         mean the path is absolute. It simply forces the directory to be named
> +         exactly that. Take::
> +
> +            BBMASK = "meta-ti/recipes-bsp/"
> +
> +        If you happen to have a directory ``my-meta-ti/recipes-bsp``, it will
> +        be matched.
> +
> +        Leading with a slash::
> +
> +           BBMASK = "/meta-ti/recipes-bsp/"
> +
> +        makes sure that doesn't happen. However, this doesn't prevent matching a
> +        directory ``meta-foo/meta-ti/recipes-bsp``. For that, use the
> +        appropriate :term:`BBFILE_PATTERN` to only match a directory from one
> +        specific layer::
> +
> +           BBMASK = "${BBFILE_PATTERN_meta-ti}/recipes-bsp/"

So this looks this is actually what most users want to do, right? Wouldn't it be
better to put this forward instead of in a note, say, at the beginning of the
definition?

For example, replacing the first example in the variable's definition by:

-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::
-
-   BBMASK = "meta-ti/recipes-misc/"
+The following example uses a complete regular expression to tell BitBake to
+ignore all recipe and recipe append files in the ``recipes-misc/`` directory
+and subdirectories of the ``meta-ti`` layer::
+
+   BBMASK = "${BBFILE_PATTERN_meta-ti}/recipes-bsp/"

What do you think?

Antonin


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [docs] [PATCH 1/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK directory matching
  2026-02-12  8:49   ` [docs] " Antonin Godard
@ 2026-02-12 11:12     ` Quentin Schulz
  0 siblings, 0 replies; 11+ messages in thread
From: Quentin Schulz @ 2026-02-12 11:12 UTC (permalink / raw)
  To: Antonin Godard, foss, bitbake-devel; +Cc: Robert P. J. Day, docs

Hi Antonin,

On 2/12/26 9:49 AM, Antonin Godard wrote:
> Hi,
> 
> On Wed Feb 11, 2026 at 7:06 PM CET, Quentin Schulz via lists.yoctoproject.org wrote:
>> 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)::
> 
> If I follow: this will mask multiple occurrences "meta-ti/recipes-misc/". How
> could there be more than one in practice? How could this ever happen?
> 

It's simply a path. There are no rules as to which layer can be named 
something. It also doesn't have to match a layer if the directory has 
meta in the name (meta-ti isn't a layer for example). There are no 
naming rules for where to put your recipes. You could very much have 
BBFILES with ${LAYERDIR}/appends-for-meta-ti/recipes-misc/*.bbappend for 
example.

FYI, there are two meta-rockchip layers in the wild. One maintained by 
Rockchip themselves, one maintained by Trevor. So it's not 
**impossible** (both share the same BBFILE_COLLECTIONS so you won't be 
able to have both included if I'm not mistaken, so that doesn't really 
apply here).

Also, I have written a meta-bsp layer in my vendor meta-cherry-es git 
repo, I'm probably not the only one having done that. What matters is 
that there's no BBFILE_COLLECTIONS name clash I think?

I hope this is better explained starting patch 3?

> Wouldn't:
> 
> """
> 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 and its subdirectories::
> """
> 
> be less confusing?
> 

It's factually incorrect.

Cheers,
Quentin


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [docs] [PATCH 3/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK matching patterns
  2026-02-12  8:58   ` [docs] " Antonin Godard
@ 2026-02-12 11:38     ` Quentin Schulz
  2026-02-16  8:02       ` Antonin Godard
  0 siblings, 1 reply; 11+ messages in thread
From: Quentin Schulz @ 2026-02-12 11:38 UTC (permalink / raw)
  To: Antonin Godard, foss, bitbake-devel; +Cc: Robert P. J. Day, docs

Hi Antonin,

On 2/12/26 9:58 AM, Antonin Godard wrote:
> Hi,
> 
> On Wed Feb 11, 2026 at 7:06 PM 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.
>>
>> Finally, this also explains that this still doesn't prevent more than
>> the intended path to be caught up, specifically because it is NOT a
>> regular expression matching an absolute path. For that though, the user
>> can use BBFILE_PATTERN set for the layer they want to mask the recipe or
>> append files to BitBake. This is typically a regex starting with
>> ^${LAYERDIR}, making it an absolute path matching.
>>
>> Let's document those limitations.
>>
>> Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
>> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
>> ---
>>   .../bitbake-user-manual-ref-variables.rst          | 22 ++++++++++++++++++++++
>>   1 file changed, 22 insertions(+)
>>
>> 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..6612dcc03 100644
>> --- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
>> +++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
>> @@ -1071,6 +1071,28 @@ overview of their function and contents.
>>            When specifying a directory name, use the trailing slash character
>>            to ensure you match just that directory name.
>>   
>> +      .. note::
>> +
>> +         The leading slash in a regular expression in :term:`BBMASK` does not
>> +         mean the path is absolute. It simply forces the directory to be named
>> +         exactly that. Take::
>> +
>> +            BBMASK = "meta-ti/recipes-bsp/"
>> +
>> +        If you happen to have a directory ``my-meta-ti/recipes-bsp``, it will
>> +        be matched.
>> +
>> +        Leading with a slash::
>> +
>> +           BBMASK = "/meta-ti/recipes-bsp/"
>> +
>> +        makes sure that doesn't happen. However, this doesn't prevent matching a
>> +        directory ``meta-foo/meta-ti/recipes-bsp``. For that, use the
>> +        appropriate :term:`BBFILE_PATTERN` to only match a directory from one
>> +        specific layer::
>> +
>> +           BBMASK = "${BBFILE_PATTERN_meta-ti}/recipes-bsp/"
> 
> So this looks this is actually what most users want to do, right? Wouldn't it be
> better to put this forward instead of in a note, say, at the beginning of the
> definition?
> 
> For example, replacing the first example in the variable's definition by:
> 
> -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::
> -
> -   BBMASK = "meta-ti/recipes-misc/"
> +The following example uses a complete regular expression to tell BitBake to
> +ignore all recipe and recipe append files in the ``recipes-misc/`` directory
> +and subdirectories of the ``meta-ti`` layer::
> +
> +   BBMASK = "${BBFILE_PATTERN_meta-ti}/recipes-bsp/"
> 

Yeah I was conflicted... not sure what's best. This does also rely on 
BBFILE_PATTERN_meta-ti starting with ^ otherwise we have another 
potential name clash and we don't actually mention that in the 
documentation of BBFILE_PATTERN (though it is set like that when 
creating a layer with bitbake-layers create-layer).

If for some reason you have:

/layers/meta-ti/recipes-bsp
/downstream/my-layer/appends/layers/meta-ti/recipes-bsp

then both would be matched (I assume, I haven't checked). That is very 
much a corner case.

I'm also pretty sure nobody actually does that. The only layer I have in 
my pool of cloned layers which uses BBMASK is meta-lts-mixins and then 
doesn't even have the layer name in the paths so /me shrugs.

> What do you think?
> 

We could start with the BBFILE_PATTERN thingy, then explain there are 
other less restrictive ways to match multiple recipes or directories 
from different locations later on. Not sure what's best.

Cheers,
Quentin


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [docs] [PATCH 3/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK matching patterns
  2026-02-12 11:38     ` Quentin Schulz
@ 2026-02-16  8:02       ` Antonin Godard
  0 siblings, 0 replies; 11+ messages in thread
From: Antonin Godard @ 2026-02-16  8:02 UTC (permalink / raw)
  To: quentin.schulz, foss, bitbake-devel; +Cc: Robert P. J. Day, docs

Hi,

On Thu Feb 12, 2026 at 12:38 PM CET, Quentin Schulz via lists.yoctoproject.org wrote:
[...]
>> So this looks this is actually what most users want to do, right? Wouldn't it be
>> better to put this forward instead of in a note, say, at the beginning of the
>> definition?
>> 
>> For example, replacing the first example in the variable's definition by:
>> 
>> -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::
>> -
>> -   BBMASK = "meta-ti/recipes-misc/"
>> +The following example uses a complete regular expression to tell BitBake to
>> +ignore all recipe and recipe append files in the ``recipes-misc/`` directory
>> +and subdirectories of the ``meta-ti`` layer::
>> +
>> +   BBMASK = "${BBFILE_PATTERN_meta-ti}/recipes-bsp/"
>> 
>
> Yeah I was conflicted... not sure what's best. This does also rely on 
> BBFILE_PATTERN_meta-ti starting with ^ otherwise we have another 
> potential name clash and we don't actually mention that in the 
> documentation of BBFILE_PATTERN (though it is set like that when 
> creating a layer with bitbake-layers create-layer).
>
> If for some reason you have:
>
> /layers/meta-ti/recipes-bsp
> /downstream/my-layer/appends/layers/meta-ti/recipes-bsp
>
> then both would be matched (I assume, I haven't checked). That is very 
> much a corner case.
>
> I'm also pretty sure nobody actually does that. The only layer I have in 
> my pool of cloned layers which uses BBMASK is meta-lts-mixins and then 
> doesn't even have the layer name in the paths so /me shrugs.
>
>> What do you think?
>> 
>
> We could start with the BBFILE_PATTERN thingy, then explain there are 
> other less restrictive ways to match multiple recipes or directories 
> from different locations later on.

Yes, I think we should do that

Antonin


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-02-16  8:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-11 18:06 [PATCH 0/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples Quentin Schulz
2026-02-11 18:06 ` [PATCH 1/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK directory matching Quentin Schulz
2026-02-12  8:49   ` [docs] " Antonin Godard
2026-02-12 11:12     ` Quentin Schulz
2026-02-11 18:06 ` [PATCH 2/4] doc: bitbake-user-manual-ref-variables: have directory examples be consistent Quentin Schulz
2026-02-11 18:06 ` [PATCH 3/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK matching patterns Quentin Schulz
2026-02-12  8:58   ` [docs] " Antonin Godard
2026-02-12 11:38     ` Quentin Schulz
2026-02-16  8:02       ` Antonin Godard
2026-02-11 18:06 ` [PATCH 4/4] doc: bitbake-user-manual-ref-variables: update BBMASK example with current meta-ti Quentin Schulz
2026-02-11 20:45 ` [docs] [PATCH 0/4] doc: bitbake-user-manual-ref-variables: clarify BBMASK examples Robert P. J. Day

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox