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. > > The sneaky thing about VAR_foo_append is that it creates VAR_foo > even if it didn't exist beforehand, meaning you though you > *appended* something to VAR while you actually replaced VAR entirely > with what VAR_foo_append is set too.
i remember testing this a few years back, and making sure i appreciated the subtleties. i might take a shot at rewriting that section, since i think it has potential for confusion. mostly, warning the reader that the first form is almost always what they want. rday
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#52625): https://lists.yoctoproject.org/g/yocto/message/52625 Mute This Topic: https://lists.yoctoproject.org/mt/81202306/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-