diff mbox series

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

Message ID 20260501091418.76994-4-bijak.dawid@gmail.com
State Accepted, archived
Commit 102fa94a1dda751ff94607ee8fed7e244cb15e1c
Headers show
Series doc: bitbake-user-manual-metadata: clarify inherit_defer documentation | expand

Commit Message

Dawid Bijak May 1, 2026, 9:14 a.m. UTC
Add a short paragraph describing how the inherit_defer makes use of override
syntax to achieve conditional inheritance, and rename VARIABLE to
VARNAME so the example uses the same identifier as the preceding
code block.

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

Comments

Quentin Schulz May 7, 2026, 1:56 p.m. UTC | #1
Hi Dawid,

On 5/1/26 11:14 AM, Dawid Bijak wrote:
> Add a short paragraph describing how the inherit_defer makes use of override
> syntax to achieve conditional inheritance, and rename VARIABLE to
> VARNAME so the example uses the same identifier as the preceding
> code block.
> 

Can you please instead rename VARNAME in inherit_defer to VARIABLE to 
match the rest of the file?

Otherwise, looks good.

Cheers,
Quentin
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 b886e0578..0c7c3ff99 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
@@ -832,8 +832,13 @@  Here is an example::
 One way to achieve a conditional inherit in this case is to use
 overrides::
 
-   VARIABLE = ""
-   VARIABLE:someoverride = "myclass"
+   VARNAME = ""
+   VARNAME:someoverride = "myclass"
+
+:ref:`inherit_defer <ref-bitbake-user-manual-metadata-inherit-defer>`
+defers the evaluation of ``${VARNAME}`` until the end of
+parsing. Assuming ``someoverride`` is in :term:`OVERRIDES`, ``${VARNAME}``
+expands to ``myclass``, which is then inherited.
 
 Alternatively, you could use an inline Python expression in the
 following form::