From f60a5d159bf4b446acb40674e19e169b12c5b57d Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 26 Feb 2012 12:58:05 +0000 Subject: bitbake/ConfHandler: Be more strict about variable quoting Currently, bitbake will accept variables in the forms: X = 1 X = '1 \ X = "1" X = '1' which will all set X=1. This patch removes the first two possibilities and makes quoting mandatory. There is little metadata out there which doesn't quote properly and bitbake will exit with an error about the exact line number and file with any problem so users can easily identify and fix issues. OE-Core has already been checked/fixed. The motivation for this is being able to give sane errors if a user does something like: IMAGE_INSTALL += # tslib mtd-utils" which currently gives a really nasty failure. (Bitbake rev: a8ae80741fea5e0ec0fb9a52a963a4baa38d2564) Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/parse_py/ConfHandler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bitbake/lib/bb/parse') diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index 9242632c50..64b8208b70 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py @@ -29,8 +29,7 @@ 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\-_+.${}]+)\s*(?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)$") +__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+(.+)" ) -- cgit v1.2.3-54-g00ecf