Add `retry` strategy
Occasionally, fetch
will encounter network issues here. The log look like the following messages.
My question is, shall we add an retry
parameter?
[(11/14) vala-m4 -> fetch ]
-----> Fetching tarball https://download.gnome.org/sources/vala/0.35/vala-0.35.2.tar.xz to /home/ubuntu/.cache/cerbero-sources/vala-m4-0.35.2/vala-0.35.2.tar.xz
--2019-05-08 09:53:10-- https://download.gnome.org/sources/vala/0.35/vala-0.35.2.tar.xz
Resolving download.gnome.org (download.gnome.org)... 209.132.180.162
Connecting to download.gnome.org (download.gnome.org)|209.132.180.162|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://mirrors.ustc.edu.cn/gnome/sources/vala/0.35/vala-0.35.2.tar.xz [following]
--2019-05-08 09:53:12-- https://mirrors.ustc.edu.cn/gnome/sources/vala/0.35/vala-0.35.2.tar.xz
Resolving mirrors.ustc.edu.cn (mirrors.ustc.edu.cn)... 218.104.71.170, 202.141.176.110
Connecting to mirrors.ustc.edu.cn (mirrors.ustc.edu.cn)|218.104.71.170|:443... connected.
Unable to establish SSL connection.
--2019-05-08 09:53:23-- https://gstreamer.freedesktop.org/src/mirror/vala-0.35.2.tar.xz
Resolving gstreamer.freedesktop.org (gstreamer.freedesktop.org)... 131.252.210.176
Connecting to gstreamer.freedesktop.org (gstreamer.freedesktop.org)|131.252.210.176|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-05-08 09:53:23 ERROR 404: Not Found.
***** Error running 'bootstrap' command:
Recipe 'vala-m4' failed at the build step 'fetch'
Traceback (most recent call last):
File "./cerbero/build/oven.py", line 166, in _cook_recipe
loop.run_until_complete(stepfunc(recipe))
File "/usr/local/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
return future.result()
File "./cerbero/build/recipe.py", line 52, in wrapped
ret = stepfunc()
File "./cerbero/build/source.py", line 77, in fetch
self.fetch_impl(**kwargs)
File "./cerbero/build/source.py", line 257, in fetch_impl
super().fetch_impl(redownload=redownload)
File "./cerbero/build/source.py", line 188, in fetch_impl
mirrors= self.config.extra_mirrors + DEFAULT_MIRRORS)
File "./cerbero/utils/shell.py", line 454, in download
raise Exception (errors)
Exception: [FatalError('Fatal Error: Error running command: wget https://download.gnome.org/sources/vala/0.35/vala-0.35.2.tar.xz -O /home/ubuntu/.cache/cerbero-sources/vala-m4-0.
35.2/vala-0.35.2.tar.xz --tries=2 --timeout=10.0 --progress=dot:giga -4',), FatalError('Fatal Error: Error running command: wget https://gstreamer.freedesktop.org/src/mirror/val
a-0.35.2.tar.xz -O /home/ubuntu/.cache/cerbero-sources/vala-m4-0.35.2/vala-0.35.2.tar.xz --tries=2 --timeout=10.0 --progress=dot:giga -4',)]