diff options
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/BBHandler.py | 5 | ||||
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/ConfHandler.py | 13 |
2 files changed, 14 insertions, 4 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index c585b60fee..88ad03960a 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py | |||
@@ -200,7 +200,10 @@ def feeder(lineno, s, fn, root, statements): | |||
200 | 200 | ||
201 | if s and s[0] == '#': | 201 | if s and s[0] == '#': |
202 | if len(__residue__) != 0 and __residue__[0][0] != "#": | 202 | if len(__residue__) != 0 and __residue__[0][0] != "#": |
203 | bb.error("There is a comment on line %s of file %s (%s) which is in the middle of a multiline expression.\nBitbake used to ignore these but no longer does so, please fix your metadata as errors are likely as a result of this change." % (lineno, fn, s)) | 203 | bb.fatal("There is a comment on line %s of file %s (%s) which is in the middle of a multiline expression.\nBitbake used to ignore these but no longer does so, please fix your metadata as errors are likely as a result of this change." % (lineno, fn, s)) |
204 | |||
205 | if len(__residue__) != 0 and __residue__[0][0] == "#" and s[0] != "#": | ||
206 | bb.fatal("There is a confusing multiline, partially commented expression on line %s of file %s (%s).\nPlease clarify whether this is all a comment or should be parsed." % (lineno, fn, s)) | ||
204 | 207 | ||
205 | if s and s[-1] == '\\': | 208 | if s and s[-1] == '\\': |
206 | __residue__.append(s[:-1]) | 209 | __residue__.append(s[:-1]) |
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index dbc6776c89..9b09c9f56a 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py | |||
@@ -98,15 +98,22 @@ def handle(fn, data, include): | |||
98 | while True: | 98 | while True: |
99 | lineno = lineno + 1 | 99 | lineno = lineno + 1 |
100 | s = f.readline() | 100 | s = f.readline() |
101 | if not s: break | 101 | if not s: |
102 | break | ||
102 | w = s.strip() | 103 | w = s.strip() |
103 | if not w: continue # skip empty lines | 104 | # skip empty lines |
105 | if not w: | ||
106 | continue | ||
104 | s = s.rstrip() | 107 | s = s.rstrip() |
105 | if s[0] == '#': continue # skip comments | ||
106 | while s[-1] == '\\': | 108 | while s[-1] == '\\': |
107 | s2 = f.readline().strip() | 109 | s2 = f.readline().strip() |
108 | lineno = lineno + 1 | 110 | lineno = lineno + 1 |
111 | if s2 and s[0] == "#" and s2[0] != "#": | ||
112 | bb.fatal("There is a confusing multiline, partially commented expression on line %s of file %s (%s).\nPlease clarify whether this is all a comment or should be parsed." % (lineno, fn, s)) | ||
109 | s = s[:-1] + s2 | 113 | s = s[:-1] + s2 |
114 | # skip comments | ||
115 | if s[0] == '#': | ||
116 | continue | ||
110 | feeder(lineno, s, fn, statements) | 117 | feeder(lineno, s, fn, statements) |
111 | 118 | ||
112 | # DONE WITH PARSING... time to evaluate | 119 | # DONE WITH PARSING... time to evaluate |