]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
Implement ??= operator
authorChris Larson <chris_larson@mentor.com>
Thu, 25 Feb 2010 16:42:28 +0000 (09:42 -0700)
committerChris Larson <chris_larson@mentor.com>
Fri, 26 Feb 2010 16:12:55 +0000 (09:12 -0700)
commit74f50fbca194c9c72bd2a540f4b9de458cb08e2d
tree797aca668fdaf799520f2722b9dfd4a01290a287
parent5b6ccb16c6e71e23dac6920cd2df994d67c2587b
Implement ??= operator

??= is a lazy, conditional assignment.  Whereas a ?= immediately assigns to
the variable if the variable has not yet been set, ??= does not apply the
default assignment until the end of the parse.  As a result, the final ??= for
a given variable is used, as opposed to the first as in ?=.

Note that the initial implementation relies upon finalise() to apply the
defaults, so a "bitbake -e" without specifying a recipe will not show the
defaults as set by ??=.  Moving application of the default into getVar adds
too large a performance hit.  We may want to revisit this later.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
doc/manual/usermanual.xml
lib/bb/parse/ast.py
lib/bb/parse/parse_py/ConfHandler.py