diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-14 10:31:12 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-14 10:46:26 +0000 |
commit | 83e101568434a099c8d9a3e626c3a37589c3a233 (patch) | |
tree | 1406cc2f43d95be6d830d30f7d394144ec621c7e /bitbake/lib/bb/parse | |
parent | 56b8bb79decd6149de538dceb7044b285ee0cbe9 (diff) | |
download | poky-83e101568434a099c8d9a3e626c3a37589c3a233.tar.gz |
bitbake: ConfHandler: Improve regexp to fix mis-parsing of += and no whitespace
If you have:
FOO = "a"
FOO += "b"
FOO+= "c"
The expected result is "a b c" however we were seeing "a b" with the FOO+
variable being assigned the value "c". This isn't the expected result.
We need to make the name part of the variale non-greedy so that any + character
becomes part of the operator. This patch does that. I compared the configuration
in OE-Core before and after the change and only the test case changed.
[YOCTO #3834]
(Bitbake rev: 2cd8d7fd12a646e6516e2c985e6a54121d19eb59)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse')
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/ConfHandler.py | 2 |
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 b3d10c6c7d..4b62a3a5eb 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py | |||
@@ -29,7 +29,7 @@ import logging | |||
29 | import bb.utils | 29 | import bb.utils |
30 | from bb.parse import ParseError, resolve_file, ast, logger | 30 | from bb.parse import ParseError, resolve_file, ast, logger |
31 | 31 | ||
32 | __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 | __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)$") |
33 | __include_regexp__ = re.compile( r"include\s+(.+)" ) | 33 | __include_regexp__ = re.compile( r"include\s+(.+)" ) |
34 | __require_regexp__ = re.compile( r"require\s+(.+)" ) | 34 | __require_regexp__ = re.compile( r"require\s+(.+)" ) |
35 | __export_regexp__ = re.compile( r"export\s+([a-zA-Z0-9\-_+.${}/]+)$" ) | 35 | __export_regexp__ = re.compile( r"export\s+([a-zA-Z0-9\-_+.${}/]+)$" ) |