summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2017-03-11 06:30:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-13 09:43:40 +0000
commitb1f09df0f664052e39d939b759a63b05d767b8ec (patch)
treeace69ed52d9beef5a39acadda71bf62540fc1b02
parent1e275980f20b48ff9c7950dac6dca1fbb2f88a7f (diff)
downloadpoky-b1f09df0f664052e39d939b759a63b05d767b8ec.tar.gz
bitbake: ConfHandler: Use the same regular expression for all variable names
When the regular expression for matching a variable name was amended with allowing the ~ character as part of the variable name, this was never done to the regular expression that matches export lines. Similarly, the regular expression that was used for matching unset variables also used the one without support for the ~ character. This unifies the regular expressions. For good measures it also corrects the regular expression used to match a variable flag name for the unset command to match the one used when setting a variable flag. (Bitbake rev: acd2fd74ed467dc85ec75d5d0815f43e493f29bf) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/parse/parse_py/ConfHandler.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py
index 5759cb20ed..f7d0cf74ab 100644
--- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py
@@ -33,7 +33,7 @@ from bb.parse import ParseError, resolve_file, ast, logger, handle
33__config_regexp__ = re.compile( r""" 33__config_regexp__ = re.compile( r"""
34 ^ 34 ^
35 (?P<exp>export\s*)? 35 (?P<exp>export\s*)?
36 (?P<var>[a-zA-Z0-9\-~_+.${}/]+?) 36 (?P<var>[a-zA-Z0-9\-_+.${}/~]+?)
37 (\[(?P<flag>[a-zA-Z0-9\-_+.]+)\])? 37 (\[(?P<flag>[a-zA-Z0-9\-_+.]+)\])?
38 38
39 \s* ( 39 \s* (
@@ -56,9 +56,9 @@ __config_regexp__ = re.compile( r"""
56 """, re.X) 56 """, re.X)
57__include_regexp__ = re.compile( r"include\s+(.+)" ) 57__include_regexp__ = re.compile( r"include\s+(.+)" )
58__require_regexp__ = re.compile( r"require\s+(.+)" ) 58__require_regexp__ = re.compile( r"require\s+(.+)" )
59__export_regexp__ = re.compile( r"export\s+([a-zA-Z0-9\-_+.${}/]+)$" ) 59__export_regexp__ = re.compile( r"export\s+([a-zA-Z0-9\-_+.${}/~]+)$" )
60__unset_regexp__ = re.compile( r"unset\s+([a-zA-Z0-9\-_+.${}/]+)$" ) 60__unset_regexp__ = re.compile( r"unset\s+([a-zA-Z0-9\-_+.${}/~]+)$" )
61__unset_flag_regexp__ = re.compile( r"unset\s+([a-zA-Z0-9\-_+.${}/]+)\[([a-zA-Z0-9\-_+.${}/]+)\]$" ) 61__unset_flag_regexp__ = re.compile( r"unset\s+([a-zA-Z0-9\-_+.${}/~]+)\[([a-zA-Z0-9\-_+.]+)\]$" )
62 62
63def init(data): 63def init(data):
64 topdir = data.getVar('TOPDIR', False) 64 topdir = data.getVar('TOPDIR', False)