parse/ConfHandler: Fix enthusiatic export regexp matching
The export regexp was only meant to catch values like: export VARIABLENAME however after the stricter quoting patch was applied, it was also matching variables like: export BAR=foo and setting the export flag on a variable called "BAR=foo". The = character is an invalid variable name character. This patch tightens up the regexp match so it only matches the intended character set and only matches variable names. (Bitbake rev: 6d1765c2eac8c1958ceb9c81d55d04a9bc961cb1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
7fee190f67
commit
0cfceaa53b
|
@ -32,7 +32,7 @@ from bb.parse import ParseError, resolve_file, ast, logger
|
|||
__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)$")
|
||||
__include_regexp__ = re.compile( r"include\s+(.+)" )
|
||||
__require_regexp__ = re.compile( r"require\s+(.+)" )
|
||||
__export_regexp__ = re.compile( r"export\s+(.+)" )
|
||||
__export_regexp__ = re.compile( r"export\s+([a-zA-Z0-9\-_+.${}/]+)$" )
|
||||
|
||||
def init(data):
|
||||
topdir = data.getVar('TOPDIR')
|
||||
|
|
Loading…
Reference in New Issue