[PATCH v2 0/4] doc: bitbake-user-manual-metadata: clarify inherit_defer documentation
Dawid Bijak <[email protected]>
| Newsgroups | org.openembedded.lists.bitbake-devel,org.yoctoproject.lists.docs |
|---|---|
| Message-ID | <[email protected]> |
This is v2 of [1].
The previous single patch has been split into 4 smaller, independently reviewable patches
as suggested by Quentin in [1].
The series addresses a few inaccuracies I came across while reading the inherit_defer documentation.
1)
Drop the claim that "If VARNAME is going to be set, it needs to be set before the inherit_defer statement is parsed"
which is wrong and defeats the purpose of inherit_defer.
The whole point of deferred evaluation is that assignments made after the directive are taken into account.
2)
Drop the anonymous Python example of assigning the class name from an anonymous Python function, which does not work:
python () {
if d.getVar('SOMETHING') == 'value':
d.setVar('VARIABLE', 'someclass')
else:
d.setVar('VARIABLE', '')
}
inherit_defer ${VARIABLE}
inherit_defer is resolved before anonymous Python functions run, so ${VARIABLE} always expands to empty
and the inherit is a no-op.
3)
Add a short explanation of how inherit_defer interacts with conditional overrides, and rename VARIABLE to
VARNAME for consistency with the preceding code block.
4)
Move the inline Python examples up into the inherit section. They work with both plain inherit
and inherit_defer, so presenting them only under inherit_defer is misleading.
Changes since v1:
- Split single patch into four
- Shorten the override example explanation
- Drop the "footgun" example from the previous patch
[1] https://lore.kernel.org/all/[email protected]/
Greets,
Dawid
Dawid Bijak (4):
doc: bitbake-user-manual-metadata: remove incorrect claim
doc: bitbake-user-manual-metadata: remove invalid anonymous Python
example
doc: bitbake-user-manual-metadata: explain inherit_defer example
doc: bitbake-user-manual-metadata: move inline python examples to
inherit section
.../bitbake-user-manual-metadata.rst | 47 +++++++------------
1 file changed, 18 insertions(+), 29 deletions(-)
--
2.48.1