diff mbox series

[v3,3/3] doc: bitbake-user-manual-metadata: explain inherit_defer example

Message ID 20260509104307.26698-4-bijak.dawid@gmail.com
State New
Headers show
Series doc: bitbake-user-manual-metadata: clarify inherit_defer documentation | expand

Commit Message

Dawid Bijak May 9, 2026, 10:43 a.m. UTC
Add a short paragraph describing how the inherit_defer makes use of override
syntax to achieve conditional inheritance, and rename VARNAME to
VARIABLE to assure consistent naming throughout the documentation.

Signed-off-by: Dawid Bijak <bijak.dawid@gmail.com>
---
 doc/bitbake-user-manual/bitbake-user-manual-metadata.rst | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
index 52a9e7fa7..59216f69a 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
@@ -827,7 +827,7 @@  the variable after the line is parsed will take effect. With the :ref:`inherit
 
 Here is an example::
 
-   inherit_defer ${VARNAME}
+   inherit_defer ${VARIABLE}
 
 One way to achieve a conditional inherit in this case is to use
 overrides::
@@ -835,6 +835,11 @@  overrides::
    VARIABLE = ""
    VARIABLE:someoverride = "myclass"
 
+:ref:`inherit_defer <ref-bitbake-user-manual-metadata-inherit-defer>`
+defers the evaluation of ``${VARIABLE}`` until the end of
+parsing. Assuming ``someoverride`` is in :term:`OVERRIDES`, ``${VARIABLE}``
+expands to ``myclass``, which is then inherited.
+
 Alternatively, you could use an inline Python expression in the
 following form::