Skip to contentSkip to conversation

doc/bitbake-user-manual-ref-variables: improve INHERIT

PATCH Superseded Adam Blank 2 participants 4 messages Oct 6, 2025 – Oct 9, 2025

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Adam Blank

author
#0 lore raw

PATCH v3 1/1 doc/bitbake-user-manual-ref-variables: improve INHERIT

Current wording makes it difficult to understand what exactly is done with INHERIT-ed anonymous functions and when.

---
Changes in v2:
- Added reference to Parsing The Base Configuration Metadata
- Emphasised how disjoint the cases are
Changes in v3:
- Regenerate the patch previously corrupted by Emacs

---
 .../bitbake-user-manual-ref-variables.rst         | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +12 -3
index 810f88689..06d48dd47 100644
@@ -1200,9 +1200,18 @@ overview of their function and contents.
 
    :term:`INHERIT`
       Causes the named class or classes to be inherited globally. Anonymous
-      functions in the class or classes are not executed for the base
-      configuration and in each individual recipe. The OpenEmbedded build
-      system ignores changes to :term:`INHERIT` in individual recipes.
+      functions in the class or classes are executed in two disjoint situations:
+
+      - When only the
+	:ref:`base configuration <bitbake-user-manual/bitbake-user-manual-execution:parsing the base configuration metadata>`
+	is parsed as a result of the following BitBake invocation::
+
+	  $ bitbake -e
+
+      - When recipes are parsed - then for each parsed recipe.
+
+      The OpenEmbedded build system ignores changes to :term:`INHERIT`
+      in individual recipes.
 
       For more information on :term:`INHERIT`, see the
       ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
#1 lore raw
Quoted 25 lines · Adam Blank

Current wording makes it difficult to understand what exactly is done with INHERIT-ed anonymous functions and when.

---
Changes in v2:
- Added reference to Parsing The Base Configuration Metadata
- Emphasised how disjoint the cases are
Changes in v3:
- Regenerate the patch previously corrupted by Emacs

---
 .../bitbake-user-manual-ref-variables.rst         | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +0 -0
index 810f88689..06d48dd47 100644
@@ -1200,9 +1200,18 @@ overview of their function and contents.
 
    :term:`INHERIT`
       Causes the named class or classes to be inherited globally. Anonymous

doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst overview of their function and contents. · line 1209

Quoted 10 lines
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +7 -3
-      functions in the class or classes are not executed for the base
-      configuration and in each individual recipe. The OpenEmbedded build
-      system ignores changes to :term:`INHERIT` in individual recipes.
+      functions in the class or classes are executed in two disjoint situations:
+
+      - When only the
+	:ref:`base configuration <bitbake-user-manual/bitbake-user-manual-execution:parsing the base configuration metadata>`
+	is parsed as a result of the following BitBake invocation::
+
+	  $ bitbake -e

I guess this is _one_ of the situations where this can happen. Maybe, rephrase to:

"""
... is parsed. For example, as a result of the following BitBake invocation::
"""

doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst overview of their function and contents. · line 1214

Quoted 5 lines
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +5 -0
+
+      - When recipes are parsed - then for each parsed recipe.
+
+      The OpenEmbedded build system ignores changes to :term:`INHERIT`
+      in individual recipes.

This is the Bitbake documentation and Bitbake is not only used by the OpenEmbedded build system, so we can't have OpenEmbedded references here. So you could rephrase to:

"""
BitBake ignores changes to ...
"""

Otherwise some documentation syntax nitpicks, not important but for next time you will know :) :

* We put two spaces after the "-", like so:

"""
- one
- two
"""

* We indent code blocks with three spaces usually, like so:

"""
Here is a code block::

code
"""

See https://git.yoctoproject.org/yocto-docs/tree/documentation/standards.md. We try to follow those.

Thanks!
Antonin

Signature · 3 lines
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#2 lore raw

Right, thanks for the tips :) I've sent a V4 of this patch. On a side note, would it make sense to chase other references to OpenEmbedded in BitBake's documentation?

Thanks,
Adam

Quoted 101 lines · Antonin Godard
Quoted 13 lines · Adam Blank

Current wording makes it difficult to understand what exactly is done with INHERIT-ed anonymous functions and when.

---
Changes in v2:
- Added reference to Parsing The Base Configuration Metadata
- Emphasised how disjoint the cases are
Changes in v3:
- Regenerate the patch previously corrupted by Emacs

Quoted 5 lines
---
 .../bitbake-user-manual-ref-variables.rst         | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 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

doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst overview of their function and contents. · line 1202

Quoted 7 lines

index 810f88689..06d48dd47 100644

doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +0 -0
@@ -1200,9 +1200,18 @@ overview of their function and contents.
 
    :term:`INHERIT`
       Causes the named class or classes to be inherited globally.

Anonymous

doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst overview of their function and contents. · line 1204

Quoted 2 lines
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +0 -2
-      functions in the class or classes are not executed for the base
-      configuration and in each individual recipe. The OpenEmbedded

build

doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst overview of their function and contents. · line 1203

Quoted 2 lines
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +1 -1
-      system ignores changes to :term:`INHERIT` in individual recipes.
+      functions in the class or classes are executed in two disjoint

situations:

doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst overview of their function and contents.

Quoted 3 lines
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +3 -0
+
+      - When only the
+     :ref:`base configuration

<bitbake-user-manual/bitbake-user-manual-execution:parsing the base configuration metadata>`

doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst overview of their function and contents. · line 1209

Quoted 3 lines
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +3 -0
+     is parsed as a result of the following BitBake invocation::
+
+       $ bitbake -e

I guess this is _one_ of the situations where this can happen. Maybe, rephrase
to:

"""
... is parsed. For example, as a result of the following BitBake invocation::
"""

doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst overview of their function and contents. · line 1214

Quoted 5 lines
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +5 -0
+
+      - When recipes are parsed - then for each parsed recipe.
+
+      The OpenEmbedded build system ignores changes to :term:`INHERIT`
+      in individual recipes.

This is the Bitbake documentation and Bitbake is not only used by the OpenEmbedded build system, so we can't have OpenEmbedded references here. So you
could rephrase to:

"""
BitBake ignores changes to ...
"""

Otherwise some documentation syntax nitpicks, not important but for next time
you will know :) :

* We put two spaces after the "-", like so:

"""
- one
- two
"""

* We indent code blocks with three spaces usually, like so:

"""
Here is a code block::

code
"""

See
https://git.yoctoproject.org/yocto-docs/tree/documentation/standards.md.
We
try to follow those.

Thanks!
Antonin

--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

#3 lore raw
Quoted 3 lines · Adam Blank via lists.openembedded.org

Right, thanks for the tips :) I've sent a V4 of this patch. On a side note, would it make sense to chase other references to OpenEmbedded in BitBake's documentation?

I don't think it's _that_ important for existing references, unless someone comes out and complains about it.

If you are looking for ways to contribute, there a list of bugs we try to fix
here: https://wiki.yoctoproject.org/wiki/Newcomers#Newcomer_Bugs

Some of them are docs-related

Thanks!
Antonin

Signature · 3 lines
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com