summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-26 12:58:05 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-28 12:33:20 +0000
commitf60a5d159bf4b446acb40674e19e169b12c5b57d (patch)
tree824646a011192e039f3aaf246433ad711a6e12e6 /bitbake
parent126f634207cd11f8e4b0324b90613b76193ca8d2 (diff)
downloadpoky-f60a5d159bf4b446acb40674e19e169b12c5b57d.tar.gz
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/parse/parse_py/ConfHandler.py3
1 files changed, 1 insertions, 2 deletions
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
29import bb.utils 29import bb.utils
30from bb.parse import ParseError, resolve_file, ast, logger 30from bb.parse import ParseError, resolve_file, ast, logger
31 31
32#__config_regexp__ = re.compile( r"(?P<exp>export\s*)?(?P<var>[a-zA-Z0-9\-_+.${}]+)\s*(?P<colon>:)?(?P<ques>\?)?=\s*(?P<apo>['\"]?)(?P<value>.*)(?P=apo)$") 32__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)$")
33__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)$")
34__include_regexp__ = re.compile( r"include\s+(.+)" ) 33__include_regexp__ = re.compile( r"include\s+(.+)" )
35__require_regexp__ = re.compile( r"require\s+(.+)" ) 34__require_regexp__ = re.compile( r"require\s+(.+)" )
36__export_regexp__ = re.compile( r"export\s+(.+)" ) 35__export_regexp__ = re.compile( r"export\s+(.+)" )