summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/build.py
diff options
context:
space:
mode:
authorJose Quaresma <quaresma.jose@gmail.com>2022-08-05 10:47:51 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-12 11:49:29 +0100
commit8a1afec0d592db6f02338d0991e7ede250b53f8e (patch)
tree5ee39187a8086d4510b9b3522effca1bc218f7d0 /bitbake/lib/bb/build.py
parentf5c616d5aff31814c0fe2a4b16e3e89bebf1c10a (diff)
downloadpoky-8a1afec0d592db6f02338d0991e7ede250b53f8e.tar.gz
bitbake: build: prefix the tasks with a timestamp in the log task_order
This is useful when debugging as it helps understand possible race conditions between tasks of diferent recipes. (Bitbake rev: 950a2ea4c91d6e13d7587104367fa85cc7efe01c) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/build.py')
-rw-r--r--bitbake/lib/bb/build.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 55f68b98c5..b8c1099ef5 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -20,6 +20,7 @@ import itertools
20import time 20import time
21import re 21import re
22import stat 22import stat
23import datetime
23import bb 24import bb
24import bb.msg 25import bb.msg
25import bb.process 26import bb.process
@@ -618,7 +619,8 @@ def _exec_task(fn, task, d, quieterr):
618 logorder = os.path.join(tempdir, 'log.task_order') 619 logorder = os.path.join(tempdir, 'log.task_order')
619 try: 620 try:
620 with open(logorder, 'a') as logorderfile: 621 with open(logorder, 'a') as logorderfile:
621 logorderfile.write('{0} ({1}): {2}\n'.format(task, os.getpid(), logbase)) 622 timestamp = datetime.datetime.now().strftime("%Y%m%d-%H%M%S.%f")
623 logorderfile.write('{0} {1} ({2}): {3}\n'.format(timestamp, task, os.getpid(), logbase))
622 except OSError: 624 except OSError:
623 logger.exception("Opening log file '%s'", logorder) 625 logger.exception("Opening log file '%s'", logorder)
624 pass 626 pass