Bug 14053

Summary: bitbake-layers doesn't show parse log
Product: [Build System, Metadata & Runtime] BitBake Reporter: Ross Burton <ross.burton>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: Undecided CC: bluelightning, JPEWhacker, poky.bs.watcher, poky.watcher
Version: 3.3   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2020-09-21 02:54:47 UTC
If I end up with an invalid bblayers configuration (for example, I've added meta-arm without meta-arm-toolchain, which is a dependency), bitbake-layers doesn't show the parse warnings but instead just backtraces. The output with some commentary:

$ bitbake-layers add-layer ~/Yocto/meta-arm/meta-arm-bsp/
NOTE: Starting bitbake server...
Traceback (most recent call last):
  File "/home/ross/Yocto/poky/bitbake/bin/bitbake-layers", line 95, in <module>
    ret = main()
  File "/home/ross/Yocto/poky/bitbake/bin/bitbake-layers", line 63, in main
    tinfoil.prepare(True)
  File "/home/ross/Yocto/poky/bitbake/lib/bb/tinfoil.py", line 410, in prepare
    self.run_command('parseConfiguration')
  File "/home/ross/Yocto/poky/bitbake/lib/bb/tinfoil.py", line 466, in run_command
    raise TinfoilCommandFailed(result[1])

This is the client side of tinfoil saying 'something failed'.  The user does not need to see a backtrace here.

bb.tinfoil.TinfoilCommandFailed: Traceback (most recent call last):
  File "/home/ross/Yocto/poky/bitbake/lib/bb/command.py", line 81, in runCommand
    result = command_method(self, commandline)
  File "/home/ross/Yocto/poky/bitbake/lib/bb/command.py", line 281, in parseConfiguration
    command.cooker.parseConfiguration()
  File "/home/ross/Yocto/poky/bitbake/lib/bb/cooker.py", line 426, in parseConfiguration
    self.handleCollections(self.data.getVar("BBFILE_COLLECTIONS"))
  File "/home/ross/Yocto/poky/bitbake/lib/bb/cooker.py", line 1255, in handleCollections
    raise CollectionError("Errors during parsing layer configuration")
bb.cooker.CollectionError: Errors during parsing layer configuration

This is the server side raising an exception and again shouldn't be shown to the user. The actual error isn't visible, it presumably went to the parselog instance which wasn't shown by bitbake-layers.
Comment 1 Ross Burton 2020-09-21 02:56:51 UTC
Duplicate, sorry.

*** This bug has been marked as a duplicate of bug 13183 ***