[PATCH v2 3/4] doc: bitbake-user-manual-metadata: explain inherit_defer example
Dawid Bijak <[email protected]>
| Newsgroups | org.openembedded.lists.bitbake-devel,org.yoctoproject.lists.docs |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> --- doc/bitbake-user-manual/bitbake-user-manual-metadata.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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:: -- 2.48.1