summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-20 22:51:23 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-21 11:08:19 +0100
commit09a9146262d58dfe4a2ea4270026b90ae33f6c91 (patch)
tree8972772da325b0cbce683ac29fd34f5880d952d2
parent807fb0b3bbad5163fdab24d379c2deba8f0b4f13 (diff)
downloadbitbake-09a9146262d58dfe4a2ea4270026b90ae33f6c91.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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/parse/parse_py/ConfHandler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/parse/parse_py/ConfHandler.py b/lib/bb/parse/parse_py/ConfHandler.py
index fc239a354..102c0e93d 100644
--- a/lib/bb/parse/parse_py/ConfHandler.py
+++ b/lib/bb/parse/parse_py/ConfHandler.py
@@ -96,7 +96,7 @@ def handle(fn, data, include):
s = s.rstrip()
if s[0] == '#': continue # skip comments
while s[-1] == '\\':
- s2 = f.readline()[:-1].strip()
+ s2 = f.readline().strip()
lineno = lineno + 1
s = s[:-1] + s2
feeder(lineno, s, fn, statements)