diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-20 22:51:23 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-21 11:09:47 +0100 |
commit | 1df5ab5ee285b3220348ce0cf371b81446d55832 (patch) | |
tree | cda0bf67acbbc29504bd9746f61d81a5dfd4d257 /bitbake/lib/bb/parse | |
parent | 9070e745c00600f909e58b4f7b99c5d32c8fdb30 (diff) | |
download | poky-1df5ab5ee285b3220348ce0cf371b81446d55832.tar.gz |
parse/ConfHandler: Fix multiline variable corruption
When parsing multiline variables in conf files, the last character can
be accidentally removed. s2 contains new data read from the file which
may or may not end with the continuation character. It makes sense to
let the next loop iteration strip this if needed.
We don't often use multiline expressions in .conf files which is why I'd
imagine we haven't noticed this before. Most variables are quoted and
its the closing quotation which often disappears.
(Bitbake rev: 09a9146262d58dfe4a2ea4270026b90ae33f6c91)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse')
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/ConfHandler.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index fc239a3540..102c0e93db 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py | |||
@@ -96,7 +96,7 @@ def handle(fn, data, include): | |||
96 | s = s.rstrip() | 96 | s = s.rstrip() |
97 | if s[0] == '#': continue # skip comments | 97 | if s[0] == '#': continue # skip comments |
98 | while s[-1] == '\\': | 98 | while s[-1] == '\\': |
99 | s2 = f.readline()[:-1].strip() | 99 | s2 = f.readline().strip() |
100 | lineno = lineno + 1 | 100 | lineno = lineno + 1 |
101 | s = s[:-1] + s2 | 101 | s = s[:-1] + s2 |
102 | feeder(lineno, s, fn, statements) | 102 | feeder(lineno, s, fn, statements) |