diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-10 14:49:51 +0100 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2021-09-24 12:38:18 -1000 |
commit | a189283ba9dba8fdf11436d5e74cd2b95c2500b4 (patch) | |
tree | 7c7ad276f136930834da4494b9173a8ee7cccd54 /lib/bb/data_smart.py | |
parent | f613d8d601be75e624e46cfe2351d1a067a9c341 (diff) | |
download | bitbake-contrib-a189283ba9dba8fdf11436d5e74cd2b95c2500b4.tar.gz |
data_smart: Improve error display for handled exceptions
We don't need tracebacks for BBHandledException. Reduces confusing output like:
ERROR: /meta/recipes-core/images/core-image-tiny-initramfs.bb: Circular task dependencies as do_image_complete depends itself via the chain do_image_complete -> do_packageswu -> do_image_qa -> do_image -> do_image_cpio
ERROR: ExpansionError during parsing /meta/recipes-core/images/core-image-tiny-initramfs.bb
Traceback (most recent call last):
File "/bitbake/lib/bb/build.py", line 1050, in follow_chain(task='do_image_qa', endtask='do_build', chain=['do_image_complete', 'do_packageswu', 'do_image_qa', 'do_image', 'do_image_cpio']):
if task in deps:
> follow_chain(othertask, endtask, chain)
chain.pop()
File "/bitbake/lib/bb/build.py", line 1050, in follow_chain(task='do_image', endtask='do_build', chain=['do_image_complete', 'do_packageswu', 'do_image_qa', 'do_image', 'do_image_cpio']):
if task in deps:
> follow_chain(othertask, endtask, chain)
chain.pop()
File "/bitbake/lib/bb/build.py", line 1050, in follow_chain(task='do_image_cpio', endtask='do_build', chain=['do_image_complete', 'do_packageswu', 'do_image_qa', 'do_image', 'do_image_cpio']):
if task in deps:
> follow_chain(othertask, endtask, chain)
chain.pop()
File "/bitbake/lib/bb/build.py", line 1038, in follow_chain(task='do_image_complete', endtask='do_build', chain=['do_image_complete', 'do_packageswu', 'do_image_qa', 'do_image', 'do_image_cpio']):
if task in chain:
> bb.fatal("Circular task dependencies as %s depends itself via the chain %s?!" % (task, " -> ".join(chain)))
chain.append(task)
File "/bitbake/lib/bb/__init__.py", line 165, in fatal:
mainlogger.critical(''.join(args), extra=kwargs)
> raise BBHandledException()
to the real error:
ERROR: /media/build1/poky/meta/recipes-core/images/core-image-tiny-initramfs.bb: Circular task dependencies as do_image_complete depends itself via the chain do_image_complete -> do_packageswu -> do_image_qa -> do_image -> do_image_cpio
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 551d4c0576a0a0c3406000029df9238b312f2263)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'lib/bb/data_smart.py')
-rw-r--r-- | lib/bb/data_smart.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py index 61b37cf33..68770832e 100644 --- a/lib/bb/data_smart.py +++ b/lib/bb/data_smart.py @@ -411,6 +411,8 @@ class DataSmart(MutableMapping): raise except bb.parse.SkipRecipe: raise + except bb.BBHandledException: + raise except Exception as exc: tb = sys.exc_info()[2] raise ExpansionError(varname, s, exc).with_traceback(tb) from exc |