Bug 9332

Summary: Error message could be improved, for incorrect syntax
Product: [Build System, Metadata & Runtime] BitBake Reporter: Igor Stoppa <igor.stoppa>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher
Version: unspecified   
Target Milestone: 2.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Igor Stoppa 2016-03-23 15:27:25 UTC
Triggering cause:

I accidentally left an extra space in front of an assignment in local.conf

 APPEND += " igor"
^
Extra space


Outcome:

I got the following error:

ERROR: Unable to parse /home/igor/dev/ostro-os/bitbake/lib/bb/parse/parse_py/ConfHandler.py
Traceback (most recent call last):
  File "/home/igor/dev/ostro-os/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 188, in feeder(lineno=334, s=' APPEND += " igor"', fn='/home/igor/dev/ostro-os/build/conf/local.conf', statements=[<bb.parse.ast.DataNode object at 0x7f9d808c3f10>, <bb.parse.ast.DataNode object at 0x7f9d808c3e90>, <bb.parse.ast.DataNode object at 0x7f9d808c3ed0>, <bb.parse.ast.DataNode object at 0x7f9d808c3f90>, <bb.parse.ast.DataNode object at 0x7f9d808c3f50>, <bb.parse.ast.DataNode object at 0x7f9d808c3fd0>, <bb.parse.ast.DataNode object at 0x7f9d808ea110>, <bb.parse.ast.DataNode object at 0x7f9d808ea090>, <bb.parse.ast.DataNode object at 0x7f9d808ea0d0>, <bb.parse.ast.DataNode object at 0x7f9d808ea150>, <bb.parse.ast.IncludeNode object at 0x7f9d808ea190>, <bb.parse.ast.DataNode object at 0x7f9d808ea210>, <bb.parse.ast.DataNode object at 0x7f9d808ea1d0>, <bb.parse.ast.DataNode object at 0x7f9d808ea290>, <bb.parse.ast.DataNode object at 0x7f9d808ea2d0>, <bb.parse.ast.DataNode object at 0x7f9d808ea350>, <bb.parse.ast.DataNode object at 0x7f9d808ea3d0>, <bb.parse.ast.DataNode object at 0x7f9d808ea390>, <bb.parse.ast.DataNode object at 0x7f9d808ea450>, <bb.parse.ast.DataNode object at 0x7f9d808ea550>, <bb.parse.ast.DataNode object at 0x7f9d808ea4d0>, <bb.parse.ast.DataNode object at 0x7f9d808ea590>, <bb.parse.ast.DataNode object at 0x7f9d808ea610>, <bb.parse.ast.DataNode object at 0x7f9d808ea690>, <bb.parse.ast.DataNode object at 0x7f9d808ea6d0>, <bb.parse.ast.DataNode object at 0x7f9d808ea710>, <bb.parse.ast.DataNode object at 0x7f9d808ea750>, <bb.parse.ast.DataNode object at 0x7f9d808ea7d0>]):
     
    >    raise ParseError("unparsed line: '%s'" % s, fn, lineno);
     
ParseError: ParseError at /home/igor/dev/ostro-os/build/conf/local.conf:334: unparsed line: ' APPEND += " igor"'


Expected outcome:
A nicer, more obvious statement, something like:

/home/igor/dev/ostro-os/build/conf/local.conf:334: unparsed line: ' APPEND += " igor"'
"line beginning with unexpected whitespace"