build: print traceback if progress handler can't be created
PATCH 1/1 build: print traceback if progress handler can't be created
Before:
ERROR: expat-native-2.2.9-r0 do_compile: 'NoneType' object has no attribute 'get'
ERROR: Logfile of failure stored in: /home/laplante/repos/oe-core/build/tmp-glibc/work/x86_64-linux/expat-native/2.2.9-r0/temp/log.do_compile.90289 Log data follows:
| ERROR: 'NoneType' object has no attribute 'get'
ERROR: Task (virtual:native:/home/laplante/repos/oe-core/meta/recipes-core/expat/expat_2.2.9.bb:do_compile) failed with exit code '1'
After:
ERROR: expat-native-2.2.9-r0 do_configure: Failed to create progress handler
ERROR: expat-native-2.2.9-r0 do_configure: Traceback (most recent call last):
File "/home/laplante/repos/oe-core/bitbake/lib/bb/build.py", line 400, in exec_func_shell
logfile = create_progress_handler(func, progress, logfile, d)
File "/home/laplante/repos/oe-core/bitbake/lib/bb/build.py", line 344, in create_progress_handler
cls_obj = functools.reduce(resolve, cls.split("."), bb.utils._context)
File "/home/laplante/repos/oe-core/bitbake/lib/bb/build.py", line 343, in resolve
return x.get(y)
AttributeError: 'NoneType' object has no attribute 'get'
ERROR: expat-native-2.2.9-r0 do_configure: 'NoneType' object has no attribute 'get'
ERROR: Logfile of failure stored in: /home/laplante/repos/oe-core/build/tmp-glibc/work/x86_64-linux/expat-native/2.2.9-r0/temp/log.do_configure.22982
ERROR: Task (virtual:native:/home/laplante/repos/oe-core/meta/recipes-core/expat/expat_2.2.9.bb:do_configure) failed with exit code '1'
--- lib/bb/build.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
lib/bb/build.py +7 -1
@@ -398,7 +398,13 @@ exit $ret progress = d.getVarFlag(func, 'progress') if progress: - logfile = create_progress_handler(func, progress, logfile, d) + try: + logfile = create_progress_handler(func, progress, logfile, d) + except: + from traceback import format_exc + logger.error("Failed to create progress handler") + logger.error(format_exc()) + raise fifobuffer = bytearray() def readfifo(data):
Signature · 1 line
2.17.1