Re: how often would one use "VAR_someoverride_append = ..."?
Quentin Schulz
Hi Robert,
On Thu, Mar 11, 2021 at 04:27:46AM -0500, Robert P. J. Day wrote: On Wed, 10 Mar 2021, Quentin Schulz wrote:For that particular example, I'm not entirely sure what the actual value for VAR would be. Also not sure what: VAR = "snafu" VAR_append = " more" VAR_qemux86 = "qemu" would mean for VAR. I don't know exactly when _append is applied to VAR... after or before the override is applied? Gut feeling would say before, in which case for non-qemux86 one would have VAR set to "snafu more" and for qemux86 it'd be "qemu". I'd anyway use bitbake -e trick to check that, which IMO should really be given in that section of the docs, to explain how one can debug the assignment of the variable thanks to the history of the variable :) on the other hand, with the example from the kernel recipe:I like to think that: KBRANCH_qemux86 is for OVERRIDING, while VAR_append_qemux86 is for CONDITIONAL appending. In which case, KBRANCH_qemux86_append is UNCONDITIONALLY APPENDING to OVERRIDDEN KBRANCH for qemux86 override. Only _append and _prepend would be a case of CONDITIONAL appending/prepending. All others are OVERRIDING. It's a topic I've long been interested in describing with simple words but couldn't come with anything yet. Because you kind of need to explain also the difference between: KBRANCH_qemux86_class-native and KBRANCH_class-native_qemux86 which are completely different. You also have many, many, many different kinds of overrides, from pn-recipe, to class-target, virtclass-lib32, task-compile, ${PN}, remove, poky, _X.Y.Z when BBVERSIONS is set, etc... If you omit _append and _prepend, it's simpler to explain that the overrides happen from right to left. But once you have _append and _prepend in the mix, it's a bit confusing and hard to explain. IMO it would warrant some kind of drawings/schemes to explain step by step what's happening, couldn't think of a proper one though. Thought of using multiple FIFOs but couldn't come up with something less confusing that what it already is :/ I'd be very happy to find a way to explain those (IMO) difficult notions and make it part of the docs. Quentin |
|