Re: [yocto] pedantic nitpickery: coding style with "FILESEXTRAPATHS:prepend"
Martin Jansa <[email protected]>
| Newsgroups | org.yoctoproject.lists.yocto |
|---|---|
| Message-ID | <CA+chaQd_v95ssGF0tLJC99+oNNc7z-2pNXdsOCs5ceuBDcJGNA@mail.gmail.com> |
On Tue, Oct 28, 2025 at 2:14 PM Leon Woestenberg via lists.yoctoproject.org <[email protected]> wrote: > > On Tue, Oct 28, 2025 at 12:37 PM Robert P. J. Day via > lists.yoctoproject.org <[email protected]> > wrote: > > > > (spoiler: turns out this is fine, but it's non-intuitive) > > arm-ffa-transport.inc:FILESEXTRAPATHS:prepend := "${ARMFILESPATHS}" > > linux-yocto%.bbappend:ARMFILESPATHS := "${THISDIR}/files:" > > Indeed, I would have written this, as the trailing double colon is > needed in the prepend context of using the variable. > > arm-ffa-transport.inc:FILESEXTRAPATHS:prepend := "${ARMFILESPATHS}:" > linux-yocto%.bbappend:ARMFILESPATHS := "${THISDIR}/files" > > But as you said, it works, so that's typically enough barrier to keep as-is. I agree, but only until there is an exception where you don't want to prepend anything (by setting ARMFILESPATHS to empty) and then having extra double colon will be worse than the currently used syntax. Similarly when there are multiple paths in ARMFILESPATHS variable and first one will need own double colon as separator, but the last one not. In all cases bitbake-getvar or bitbake -e is your friend (when git grep isn't enough). Cheers,