Openembedded Bitbake Development
 help / color / mirror / Atom feed
* [PATCH v2 0/4] doc: bitbake-user-manual-metadata: clarify inherit_defer documentation
@ 2026-05-01  9:14 Dawid Bijak
  2026-05-01  9:14 ` [PATCH v2 1/4] doc: bitbake-user-manual-metadata: remove incorrect claim Dawid Bijak
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Dawid Bijak @ 2026-05-01  9:14 UTC (permalink / raw)
  To: bitbake-devel; +Cc: docs, quentin.schulz, richard.purdie, Dawid Bijak

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/20260424062327.820993-1-bijak.dawid@gmail.com/

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



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-05-07 19:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-01  9:14 [PATCH v2 0/4] doc: bitbake-user-manual-metadata: clarify inherit_defer documentation Dawid Bijak
2026-05-01  9:14 ` [PATCH v2 1/4] doc: bitbake-user-manual-metadata: remove incorrect claim Dawid Bijak
2026-05-07 13:48   ` Quentin Schulz
2026-05-07 19:04     ` Dawid Bijak
2026-05-01  9:14 ` [PATCH v2 2/4] doc: bitbake-user-manual-metadata: remove invalid anonymous Python example Dawid Bijak
2026-05-07 13:52   ` Quentin Schulz
2026-05-01  9:14 ` [PATCH v2 3/4] doc: bitbake-user-manual-metadata: explain inherit_defer example Dawid Bijak
2026-05-07 13:56   ` Quentin Schulz
2026-05-01  9:14 ` [PATCH v2 4/4] doc: bitbake-user-manual-metadata: move inline python examples to inherit section Dawid Bijak
2026-05-07 14:05   ` Quentin Schulz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox