From: Dawid Bijak <bijak.dawid@gmail.com>
To: bitbake-devel@lists.openembedded.org
Cc: docs@lists.yoctoproject.org, Dawid Bijak <bijak.dawid@gmail.com>
Subject: [PATCH 0/1] doc: bitbake-user-manual-metadata: clarify inherit_defer documentation
Date: Fri, 24 Apr 2026 08:23:26 +0200 [thread overview]
Message-ID: <20260424062327.820993-1-bijak.dawid@gmail.com> (raw)
Hi,
I've been reading through the inherit_defer documentation, and granted my limited knowledge of bitbake,
I think the current documentation is incorrect or misleading in a few places:
1)
The sentence "If VARNAME is going to be set, it needs to be set before the inherit_defer statement is parsed"
seems plainly wrong and defeats the purpose of inherit_defer.
As I understand it, the whole point of deferred evaluation is that assignments made after the directive are taken into account.
2)
The examples using inline Python, e.g. inherit_defer ${@'classname' if condition else ''},
are not specific to inherit_defer - they would work equally well with plain inherit.
They probably belong in the inherit section.
3)
The suggested technique of assigning the class name from an anonymous Python function does not appear to work:
python () {
if d.getVar('SOMETHING') == 'value':
d.setVar('VARIABLE', 'someclass')
else:
d.setVar('VARIABLE', '')
}
inherit_defer ${VARIABLE}
From my experiments, inherit_defer is resolved before anonymous Python functions run, so ${VARIABLE} always expands to empty
and the inherit is a no-op.
Is that the intended order and the documentation is wrong, or is this a bug in bitbake, or did I just get it wrong?
Anyway, just in case, the attached patch rewords the documentation to address points 1 and 2, and adds a note about point 3.
Happy to revise if I've misunderstood any of it.
Thanks,
Dawid
Dawid Bijak (1):
doc: bitbake-user-manual-metadata: fix inherit_defer documentation
.../bitbake-user-manual-metadata.rst | 61 ++++++++++---------
1 file changed, 32 insertions(+), 29 deletions(-)
--
2.48.1
next reply other threads:[~2026-04-24 6:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 6:23 Dawid Bijak [this message]
2026-04-24 6:23 ` [PATCH 1/1] doc: bitbake-user-manual-metadata: fix inherit_defer documentation Dawid Bijak
2026-04-27 12:35 ` [docs] " Quentin Schulz
2026-04-27 12:47 ` Quentin Schulz
2026-04-27 18:14 ` Dawid Bijak
2026-04-28 20:42 ` [bitbake-devel] " Richard Purdie
2026-04-29 14:11 ` Dawid Bijak
2026-04-29 14:24 ` Quentin Schulz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260424062327.820993-1-bijak.dawid@gmail.com \
--to=bijak.dawid@gmail.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=docs@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox