summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse/parse_py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-02-25 09:42:28 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-03-22 15:02:59 +0000
commit57044b9a6240235a403eac4067e2e2113e03b6eb (patch)
tree46f15cb768778aa0f8363d6da2e98c6aaa69aadb /bitbake/lib/bb/parse/parse_py
parentada2a8494a88b59de25c0a44fce30190f560eff4 (diff)
downloadpoky-57044b9a6240235a403eac4067e2e2113e03b6eb.tar.gz
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. (Bitbake rev: 74f50fbca194c9c72bd2a540f4b9de458cb08e2d) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/parse/parse_py')
-rw-r--r--bitbake/lib/bb/parse/parse_py/ConfHandler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py
index a1eaf317ac..f4f85de245 100644
--- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py
@@ -28,7 +28,7 @@ import re, bb.data, os, sys
28from bb.parse import ParseError, resolve_file, ast 28from bb.parse import ParseError, resolve_file, ast
29 29
30#__config_regexp__ = re.compile( r"(?P<exp>export\s*)?(?P<var>[a-zA-Z0-9\-_+.${}]+)\s*(?P<colon>:)?(?P<ques>\?)?=\s*(?P<apo>['\"]?)(?P<value>.*)(?P=apo)$") 30#__config_regexp__ = re.compile( r"(?P<exp>export\s*)?(?P<var>[a-zA-Z0-9\-_+.${}]+)\s*(?P<colon>:)?(?P<ques>\?)?=\s*(?P<apo>['\"]?)(?P<value>.*)(?P=apo)$")
31__config_regexp__ = re.compile( r"(?P<exp>export\s*)?(?P<var>[a-zA-Z0-9\-_+.${}/]+)(\[(?P<flag>[a-zA-Z0-9\-_+.]+)\])?\s*((?P<colon>:=)|(?P<ques>\?=)|(?P<append>\+=)|(?P<prepend>=\+)|(?P<predot>=\.)|(?P<postdot>\.=)|=)\s*(?P<apo>['\"]?)(?P<value>.*)(?P=apo)$") 31__config_regexp__ = re.compile( r"(?P<exp>export\s*)?(?P<var>[a-zA-Z0-9\-_+.${}/]+)(\[(?P<flag>[a-zA-Z0-9\-_+.]+)\])?\s*((?P<colon>:=)|(?P<lazyques>\?\?=)|(?P<ques>\?=)|(?P<append>\+=)|(?P<prepend>=\+)|(?P<predot>=\.)|(?P<postdot>\.=)|=)\s*(?P<apo>['\"]?)(?P<value>.*)(?P=apo)$")
32__include_regexp__ = re.compile( r"include\s+(.+)" ) 32__include_regexp__ = re.compile( r"include\s+(.+)" )
33__require_regexp__ = re.compile( r"require\s+(.+)" ) 33__require_regexp__ = re.compile( r"require\s+(.+)" )
34__export_regexp__ = re.compile( r"export\s+(.+)" ) 34__export_regexp__ = re.compile( r"export\s+(.+)" )