From: Quentin Schulz <quentin.schulz@cherry.de>
To: Dawid Bijak <bijak.dawid@gmail.com>,
Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: bitbake-devel@lists.openembedded.org, docs@lists.yoctoproject.org
Subject: Re: [bitbake-devel] [docs] [PATCH 1/1] doc: bitbake-user-manual-metadata: fix inherit_defer documentation
Date: Wed, 29 Apr 2026 16:24:48 +0200 [thread overview]
Message-ID: <9df7bd7f-3a5a-43d7-a0c3-415f69917f18@cherry.de> (raw)
In-Reply-To: <qwehgszst3cphuw4jqsj2u36333p2lpo6cytkdcx22prjmxrdx@acnraxmxwfl5>
Hi Dawid,
On 4/29/26 4:11 PM, Dawid Bijak wrote:
> Hi,
>
> On Tue, Apr 28, 2026 at 09:42:28PM +0100, Richard Purdie wrote:
>> On Mon, 2026-04-27 at 20:14 +0200, Dawid Bijak via lists.openembedded.org wrote:
>>> Hi Quentin,
>>> Thanks for your response.
>>> I'm afraid I don't quite follow your point about PACKAGECONFIG.contains.
>>> I'm not sure what you're referring to exactly.
>>> But, as far as I can tell, the inherit statement works fine with inline python expressions.
>>> I think, it evaluates the expression in place, much like := would.
>>>
>>> For example, on current master I tried the following:
>>> COND = ""
>>> COND:append = " x"
>>> inherit ${@bb.utils.contains('COND', 'x', 'foo', 'bar', d)}
>>> This inherits foo.
>>>
>>> However, if I move the :append below the inherit directive:
>>> COND = ""
>>> inherit ${@bb.utils.contains('COND', 'x', 'foo', 'bar', d)}
>>> COND:append = " x"
>>> it inherits bar.
>>
>> It works, as long as you are sure that COND won't be changed after the
>> inherit. When mutliple files altering the variables are involved, that
>> is often unclear. I think the doc's intent is therefore to recommend
>> anything with variable accesses is therefore deferred, unless the user
>> is sure they know what they're doing.
>
> Richard, thanks for chiming in. Your explanation reassures me that my understanding
> of inherit_defer was correct.
>
> In summary, I believe the 3 issues with the current documentation that I identified
> in the cover letter are still valid, and my patch still applies.
>
1) The sentence should only apply to the inherit statement, and not
inherit_defer as that's the point of inherit_defer. So this is fine.
2) NACK. We're deliberately not documenting footguns. You can provide an
example if you really want to in the inherit section, and add a big fat
warning after it that it'll break in some scenario so you really
shouldn't do that and instead use inherit_defer.
3) This is fine, thanks for the fix.
I would suggest to make three separate commits, with 2) last, that way
we can pick 1) and 3) (which will become 1) and 2)) and argue on 2)
(which will become 3)) without hindering merging of the other commits.
Cheers,
Quentin
prev parent reply other threads:[~2026-04-29 14:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 6:23 [PATCH 0/1] doc: bitbake-user-manual-metadata: clarify inherit_defer documentation Dawid Bijak
2026-04-24 6:23 ` [PATCH 1/1] doc: bitbake-user-manual-metadata: fix " 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 [this message]
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=9df7bd7f-3a5a-43d7-a0c3-415f69917f18@cherry.de \
--to=quentin.schulz@cherry.de \
--cc=bijak.dawid@gmail.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=docs@lists.yoctoproject.org \
--cc=richard.purdie@linuxfoundation.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