]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: bitbake-worker: print full traceback instead of message only
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 1 Nov 2016 15:05:12 +0000 (17:05 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 16 Nov 2016 10:37:58 +0000 (10:37 +0000)
Print full traceback instead of just the exception message in the
child() function inside fork_off_task(). This makes debugging a lot
easier as the function catches a generic "Exception" and the exception
message alone might not give much information.

[YOCTO #10393]

(Bitbake rev: 61cc397a5b7136afb37052a2860c6c39a176ddab)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/bin/bitbake-worker

index 500f2ad1611505800dcf09e01ec34195a75b8a70..af66ff05c87e02f27039784be4172395d72068f1 100755 (executable)
@@ -11,6 +11,7 @@ import select
 import errno
 import signal
 import pickle
+import traceback
 from multiprocessing import Lock
 
 if sys.getfilesystemencoding() != "utf-8":
@@ -234,9 +235,9 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, append
                 if quieterrors:
                     the_data.setVarFlag(taskname, "quieterrors", "1")
 
-            except Exception as exc:
+            except Exception:
                 if not quieterrors:
-                    logger.critical(str(exc))
+                    logger.critical(traceback.format_exc())
                 os._exit(1)
             try:
                 if cfg.dry_run: