[bitbake-devel] [PATCH 2/4] main: When retrying the connection, show the attempt number

Richard Purdie richard.purdie at linuxfoundation.org
Tue Dec 25 11:55:31 UTC 2018


The current bitbake output makes it hard to know which retry is being
attempted. Add this information to the output to make it clearer.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/main.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/bb/main.py b/lib/bb/main.py
index 7dc953da66..41dd3b9e03 100755
--- a/lib/bb/main.py
+++ b/lib/bb/main.py
@@ -475,10 +475,11 @@ def setup_bitbake(configParams, configuration, extrafeatures=None):
                 if not retries:
                     raise
                 retries -= 1
+                tryno = 8 - retries
                 if isinstance(e, (bb.server.process.ProcessTimeout, BrokenPipeError)):
-                    logger.info("Retrying server connection...")
+                    logger.info("Retrying server connection (#%d)..." % tryno)
                 else:
-                    logger.info("Retrying server connection... (%s)" % traceback.format_exc())
+                    logger.info("Retrying server connection (#%d)... (%s)" % (tryno, traceback.format_exc()))
             if not retries:
                 bb.fatal("Unable to connect to bitbake server, or start one")
             if retries < 5:
-- 
2.19.1



More information about the bitbake-devel mailing list