diff options
Diffstat (limited to 'bitbake/lib/bb/main.py')
-rwxr-xr-x | bitbake/lib/bb/main.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py index f56c3d46a2..6294b85cfd 100755 --- a/bitbake/lib/bb/main.py +++ b/bitbake/lib/bb/main.py | |||
@@ -17,6 +17,7 @@ import warnings | |||
17 | import fcntl | 17 | import fcntl |
18 | import time | 18 | import time |
19 | import traceback | 19 | import traceback |
20 | import datetime | ||
20 | 21 | ||
21 | import bb | 22 | import bb |
22 | from bb import event | 23 | from bb import event |
@@ -384,6 +385,9 @@ def bitbake_main(configParams, configuration): | |||
384 | 385 | ||
385 | return 1 | 386 | return 1 |
386 | 387 | ||
388 | def timestamp(): | ||
389 | return datetime.datetime.now().strftime('%H:%M:%S.%f') | ||
390 | |||
387 | def setup_bitbake(configParams, extrafeatures=None): | 391 | def setup_bitbake(configParams, extrafeatures=None): |
388 | # Ensure logging messages get sent to the UI as events | 392 | # Ensure logging messages get sent to the UI as events |
389 | handler = bb.event.LogHandler() | 393 | handler = bb.event.LogHandler() |
@@ -434,7 +438,7 @@ def setup_bitbake(configParams, extrafeatures=None): | |||
434 | else: | 438 | else: |
435 | logger.info("Reconnecting to bitbake server...") | 439 | logger.info("Reconnecting to bitbake server...") |
436 | if not os.path.exists(sockname): | 440 | if not os.path.exists(sockname): |
437 | logger.info("Previous bitbake instance shutting down?, waiting to retry...") | 441 | logger.info("Previous bitbake instance shutting down?, waiting to retry... (%s)" % timestamp()) |
438 | i = 0 | 442 | i = 0 |
439 | lock = None | 443 | lock = None |
440 | # Wait for 5s or until we can get the lock | 444 | # Wait for 5s or until we can get the lock |
@@ -459,9 +463,9 @@ def setup_bitbake(configParams, extrafeatures=None): | |||
459 | retries -= 1 | 463 | retries -= 1 |
460 | tryno = 8 - retries | 464 | tryno = 8 - retries |
461 | if isinstance(e, (bb.server.process.ProcessTimeout, BrokenPipeError, EOFError, SystemExit)): | 465 | if isinstance(e, (bb.server.process.ProcessTimeout, BrokenPipeError, EOFError, SystemExit)): |
462 | logger.info("Retrying server connection (#%d)..." % tryno) | 466 | logger.info("Retrying server connection (#%d)... (%s)" % (tryno, timestamp())) |
463 | else: | 467 | else: |
464 | logger.info("Retrying server connection (#%d)... (%s)" % (tryno, traceback.format_exc())) | 468 | logger.info("Retrying server connection (#%d)... (%s, %s)" % (tryno, traceback.format_exc(), timestamp())) |
465 | 469 | ||
466 | if not retries: | 470 | if not retries: |
467 | bb.fatal("Unable to connect to bitbake server, or start one (server startup failures would be in bitbake-cookerdaemon.log).") | 471 | bb.fatal("Unable to connect to bitbake server, or start one (server startup failures would be in bitbake-cookerdaemon.log).") |