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>
This commit is contained in:
parent
1e275980f2
commit
b1f09df0f6
|
@ -33,7 +33,7 @@ from bb.parse import ParseError, resolve_file, ast, logger, handle
|
||||||
__config_regexp__ = re.compile( r"""
|
__config_regexp__ = re.compile( r"""
|
||||||
^
|
^
|
||||||
(?P<exp>export\s*)?
|
(?P<exp>export\s*)?
|
||||||
(?P<var>[a-zA-Z0-9\-~_+.${}/]+?)
|
(?P<var>[a-zA-Z0-9\-_+.${}/~]+?)
|
||||||
(\[(?P<flag>[a-zA-Z0-9\-_+.]+)\])?
|
(\[(?P<flag>[a-zA-Z0-9\-_+.]+)\])?
|
||||||
|
|
||||||
\s* (
|
\s* (
|
||||||
|
@ -56,9 +56,9 @@ __config_regexp__ = re.compile( r"""
|
||||||
""", re.X)
|
""", re.X)
|
||||||
__include_regexp__ = re.compile( r"include\s+(.+)" )
|
__include_regexp__ = re.compile( r"include\s+(.+)" )
|
||||||
__require_regexp__ = re.compile( r"require\s+(.+)" )
|
__require_regexp__ = re.compile( r"require\s+(.+)" )
|
||||||
__export_regexp__ = re.compile( r"export\s+([a-zA-Z0-9\-_+.${}/]+)$" )
|
__export_regexp__ = re.compile( r"export\s+([a-zA-Z0-9\-_+.${}/~]+)$" )
|
||||||
__unset_regexp__ = re.compile( r"unset\s+([a-zA-Z0-9\-_+.${}/]+)$" )
|
__unset_regexp__ = re.compile( r"unset\s+([a-zA-Z0-9\-_+.${}/~]+)$" )
|
||||||
__unset_flag_regexp__ = re.compile( r"unset\s+([a-zA-Z0-9\-_+.${}/]+)\[([a-zA-Z0-9\-_+.${}/]+)\]$" )
|
__unset_flag_regexp__ = re.compile( r"unset\s+([a-zA-Z0-9\-_+.${}/~]+)\[([a-zA-Z0-9\-_+.]+)\]$" )
|
||||||
|
|
||||||
def init(data):
|
def init(data):
|
||||||
topdir = data.getVar('TOPDIR', False)
|
topdir = data.getVar('TOPDIR', False)
|
||||||
|
|
Loading…
Reference in New Issue