Hi Robert,

On Wed, Mar 10, 2021 at 06:16:44AM -0500, Robert P. J. Day wrote:
> On Tue, 9 Mar 2021, Quentin Schulz wrote:
> 
> > Hi Robert,
> >
> > On Tue, Mar 09, 2021 at 09:39:14AM -0500, Robert P. J. Day wrote:
> > >
> > >   bitbake manual, chapter 3, examples of conditional syntax:
> > >
> > > https://docs.yoctoproject.org/bitbake/bitbake-user-manual/bitbake-user-manual-metadata.html#examples
> > >
> > > correctly distinguishes between A_foo_append and A_append_foo, but how
> > > often would one use that first form, anyway?
> > >
> > >   most uses of conditional appending are either just straight
> > > appending:
> > >
> > >   VAR_append = "fubar"
> > >
> > > or used with an override thusly:
> > >
> > >   VAR_append_x86 = "snafu"
> > >
> > > is there an actual practical usage of, say:
> > >
> > >   VAR_x86_append = "huh"
> > >
> > > i can't remember the last time i saw something of that form and,
> > > while it might be worth explaining, it seems that the reader might be
> > > warned that that form is almost certainly *not* what they want.
> > >
> >
> > Yes, in 99% of the cases, you want VAR_append_foo and not VAR_foo_append.
> >
> > VAR_foo_append makes sense when you want to append to VAR_foo which
> > is a way to override completely VAR for builds matching the foo
> > override. This happens in kernel-yocto recipes where branches and
> > defconfigs are different per machine for example.
> 
>   can you point at an actual example of that? i took a look and all
> the yocto kernel recipes i see use the first form. am i just looking
> in the wrong place?
> 

https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-kernel/linux/linux-yocto_5.10.bb#n12
for example.

This is an example of a "valid" use case (not that there are invalid
ones) for VAR_foo.

Would probably a better example:
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-kernel/linux/linux-yocto_5.10.bb#n50

So, you might decide that a machine is so much different than others
that KERNEL_FEATURES should be overridden for said machine.

Then in a bbappend, one might want to add another feature for this
machine, they'll therefore need to use KERNEL_FEATURES_foo_append.

I do not have examples at hand of VAR_foo_append except the ones Leon
sent in another mail. Which should show how rare it is :)

Cheers,
Quentin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#52647): https://lists.yoctoproject.org/g/yocto/message/52647
Mute This Topic: https://lists.yoctoproject.org/mt/81202306/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to