diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-02-26 12:58:05 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-02-28 12:33:20 +0000 |
commit | f60a5d159bf4b446acb40674e19e169b12c5b57d (patch) | |
tree | 824646a011192e039f3aaf246433ad711a6e12e6 /bitbake/lib/bb | |
parent | 126f634207cd11f8e4b0324b90613b76193ca8d2 (diff) | |
download | poky-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/lib/bb')
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/ConfHandler.py | 3 |
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 | |||
29 | import bb.utils | 29 | import bb.utils |
30 | from bb.parse import ParseError, resolve_file, ast, logger | 30 | from 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+(.+)" ) |