diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index 4b62a3a5eb..3255c8beb8 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py @@ -29,7 +29,30 @@ import logging import bb.utils from bb.parse import ParseError, resolve_file, ast, logger -__config_regexp__ = re.compile( r"(?Pexport\s*)?(?P[a-zA-Z0-9\-~_+.${}/]+?)(\[(?P[a-zA-Z0-9\-_+.]+)\])?\s*((?P:=)|(?P\?\?=)|(?P\?=)|(?P\+=)|(?P=\+)|(?P=\.)|(?P\.=)|=)\s*(?!'[^']*'[^']*'$)(?!\"[^\"]*\"[^\"]*\"$)(?P['\"])(?P.*)(?P=apo)$") +__config_regexp__ = re.compile( r""" + ^ + (?Pexport\s*)? + (?P[a-zA-Z0-9\-~_+.${}/]+?) + (\[(?P[a-zA-Z0-9\-_+.]+)\])? + + \s* ( + (?P:=) | + (?P\?\?=) | + (?P\?=) | + (?P\+=) | + (?P=\+) | + (?P=\.) | + (?P\.=) | + = + ) \s* + + (?!'[^']*'[^']*'$) + (?!\"[^\"]*\"[^\"]*\"$) + (?P['\"]) + (?P.*) + (?P=apo) + $ + """, re.X) __include_regexp__ = re.compile( r"include\s+(.+)" ) __require_regexp__ = re.compile( r"require\s+(.+)" ) __export_regexp__ = re.compile( r"export\s+([a-zA-Z0-9\-_+.${}/]+)$" )