On the local bitbake submodule:
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index b853da3..2e9046d 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -39,6 +39,7 @@ import errno
import bb.persist_data, bb.utils
import bb.checksum
import bb.process
+import time
__version__ = "2"
_checksum_cache = bb.checksum.FileChecksumCache()
@@ -842,22 +843,28 @@ def runfetchcmd(cmd, d, quiet=False, cleanup=None, log=None, workdir=None):
success = False
error_message = ""
+ tries = 5;
+
+ while True:
+ try:
+ (output, errors) = bb.process.run(cmd, log=log, shell=True, stderr=subprocess.PIPE, cwd=workdir)
+ success = True
+ except bb.process.NotFoundError as e:
+ error_message = "Fetch command %s" % (e.command)
+ except bb.process.ExecutionError as e:
+ if e.stdout:
+ output = "output:\n%s\n%s" % (e.stdout, e.stderr)
+ elif e.stderr:
+ output = "output:\n%s" % e.stderr
+ else:
+ output = "no output"
+ error_message = "Fetch command %s failed with exit code %s, %s" % (e.command, e.exitcode, output)
+ except bb.process.CmdError as e:
+ error_message = "Fetch command %s could not be run:\n%s" % (e.command, e.msg)
+ if (success or --tries == 0):
+ break;
+ time.sleep(1)
- try:
- (output, errors) = bb.process.run(cmd, log=log, shell=True, stderr=subprocess.PIPE, cwd=workdir)
- success = True
- except bb.process.NotFoundError as e:
- error_message = "Fetch command %s" % (e.command)
- except bb.process.ExecutionError as e:
- if e.stdout:
- output = "output:\n%s\n%s" % (e.stdout, e.stderr)
- elif e.stderr:
- output = "output:\n%s" % e.stderr
- else:
- output = "no output"
- error_message = "Fetch command %s failed with exit code %s, %s" % (e.command, e.exitcode, output)
- except bb.process.CmdError as e:
- error_message = "Fetch command %s could not be run:\n%s" % (e.command, e.msg)
if not success:
for f in cleanup:
try:
This does 5 attempts with a second interval. It handles the intermittent connection errors, but obviously not any downtime.
Too bad Bitbake doesn't support mirrors for specific SRC_URI's...
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.