Re: [PATCH v2 2/4] doc: bitbake-user-manual-metadata: remove invalid anonymous Python example
Quentin Schulz <[email protected]>
| Newsgroups | org.openembedded.lists.bitbake-devel,org.yoctoproject.lists.docs |
|---|---|
| Message-ID | <[email protected]> |
Hi Dawid,
On 5/1/26 11:14 AM, Dawid Bijak wrote:
> The documentation for inherit_defer suggested that conditional inheritance
> can be achieved by setting a variable inside an anonymous python function
> and then referencing it from inherit_defer.
> This does not work: inherit_defer is resolved before the anonymous Python
> functions run.
>
> Remove the incorrect example.
>
That's fine, but this is so far an undocumented limitation and it would
be really nice to say it's not supported!
Something like:
.. warning::
Setting or modifying variables within an :ref:`anonymous Python
function <bitbake-user-manual/bitbake-user-manual-metadata:Anonymous
Python Functions>` will have no impact on the value of that variable in
an :ref:`inherit_defer <ref-bitbake-user-manual-metadata-inherit-defer>`
directive as the function is run after the directive is resolved.
(untested and probably missing some formatting, e.g. line-wrapping :) ).
Cheers,
Quentin