From 0cfceaa53b16e487aad7117d87bb79c0b6f92cf7 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 29 Feb 2012 13:09:15 +0000 Subject: 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 --- bitbake/lib/bb/parse/parse_py/ConfHandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake/lib/bb/parse/parse_py/ConfHandler.py') diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index 64b8208b70..0e24b723f0 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py @@ -32,7 +32,7 @@ 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)$") __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') -- cgit v1.2.3-54-g00ecf