bitbake-devel.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] doc: bitbake-user-manual-metadata: clarify inherit_defer documentation
@ 2026-05-09 10:43 Dawid Bijak
  2026-05-09 10:43 ` [PATCH v3 1/3] doc: bitbake-user-manual-metadata: remove incorrect claim Dawid Bijak
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Dawid Bijak @ 2026-05-09 10:43 UTC (permalink / raw)
  To: bitbake-devel; +Cc: docs, quentin.schulz, richard.purdie, Dawid Bijak

v3 of a series addressing 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.

    add a warning explaining that using a anonymous python has no effect
    on the inherit_defer

3)
    Add a short explanation of how inherit_defer interacts with conditional overrides, and rename VARNAME to
    VARIABLE for consistency with the rest of documentation.

Changes since v2:
    - Link to v2: [2]
    - Picked up Quentin's Reviewed-by for patch 1 from [3]
    - Applied Quentin's suggestion from [4] and added Suggested-by:
      Quentin to patch 2
    - Renamed VARNAME to VARIABLE as suggested by Quentin in [5] in
      patch 3
    - Dropped patch 4 following NACK in [6]

Changes since v1:
  - Link to v1: [1]
  - 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/
[2] https://lore.kernel.org/all/20260501091418.76994-1-bijak.dawid@gmail.com/
[3] https://lore.kernel.org/all/aff89f3f-7bc6-4634-b834-1872d559c8e0@cherry.de/
[4] https://lore.kernel.org/all/fec735f6-f87d-4036-a013-384ed7c54701@cherry.de/
[5] https://lore.kernel.org/all/a3a8a5c5-81c3-4764-aba6-32c84ce55a7e@cherry.de/
[6] https://lore.kernel.org/all/7558cb67-4ee0-4cde-9d43-4ce2b8d1ef5f@cherry.de/

Greets,
Dawid

Dawid Bijak (3):
  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

 .../bitbake-user-manual-metadata.rst          | 28 +++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)

-- 
2.48.1



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

end of thread, other threads:[~2026-05-11 12:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-09 10:43 [PATCH v3 0/3] doc: bitbake-user-manual-metadata: clarify inherit_defer documentation Dawid Bijak
2026-05-09 10:43 ` [PATCH v3 1/3] doc: bitbake-user-manual-metadata: remove incorrect claim Dawid Bijak
2026-05-09 10:43 ` [PATCH v3 2/3] doc: bitbake-user-manual-metadata: remove invalid anonymous Python example Dawid Bijak
2026-05-09 10:43 ` [PATCH v3 3/3] doc: bitbake-user-manual-metadata: explain inherit_defer example Dawid Bijak
2026-05-11 12:39 ` [docs] [PATCH v3 0/3] doc: bitbake-user-manual-metadata: clarify inherit_defer documentation Mathieu Dubois-Briand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).