[OE-core] proper "style" for VAR_append_override?

Robert P. J. Day rpjday at crashcourse.ca
Sat Mar 7 14:43:34 UTC 2015


  more nitpickery, but i've noticed a couple different ways in the OE
code base and documentation for conditionally appending based on an
override, and it might just be that i'm confused about the underlying
mechanics of the append operators.

  first, there's this from qemu.inc:

KERNEL_FEATURES_append_pn-linux-yocto = " features/nfsd/nfsd-enable.scc"

i've always read that as, "if override of linux-yocto package is in
effect, then add this feature to KERNEL_FEATURES using the "append"
operator, which will leave the appending to the end and, in addition,
*requires* that we explicitly have that leading space given that we're
using _append.

  it's also my understanding that i can have multiple assignments like
that (possibly based on different overrides), and they will all be
processed properly and finally appended to (in this case)
KERNEL_FEATURES. so far, so good?

  but if i check the YP ref manual, i see documentation like this:

ref-variables.xml:     KERNEL_FEATURES_append_cedartrail += "bsp/cedartrail/cedartrail-pvr-merge.scc"
ref-variables.xml:     KERNEL_FEATURES_append_cedartrail += "cfg/efi-ext.scc"
ref-variables.xml:     KERNEL_FEATURES_append_cedartrail-nopvr += " cfg/smp.scc"

which looks a bit weird -- combining "_append" with "+=" (and even
inconsistently adding that leading space).

  is there some difference between the above approaches i've never
understood? is there a preferred style?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



More information about the Openembedded-core mailing list