Bug 9332 - Error message could be improved, for incorrect syntax
Summary: Error message could be improved, for incorrect syntax
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.1
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-03-23 15:27 UTC by Igor Stoppa
Modified: 2016-03-30 20:26 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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"