From 63674cd048f2763638d155cf515be08cc41e99f9 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 6 Jun 2024 05:41:16 -0500 Subject: abuild-fetch: Add retry options to cURL invocation This implements a significant number of quality-of-life improvements for automated package building, including: * Connection timeout of 10 seconds, for mirrors that are unresponsive. * Two retries, to try a different mirror on round-robin for i.e. KDE. Closes: #5 --- abuild-fetch.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/abuild-fetch.c b/abuild-fetch.c index 5adb5fc..a52ea89 100644 --- a/abuild-fetch.c +++ b/abuild-fetch.c @@ -90,8 +90,11 @@ int fetch(char *url, const char *destdir) .l_len = 0, }; struct cmdarray curlcmd = { - .argc = 5, - .argv = { "curl", "-L", "-f", "-o", partfile, NULL } + .argc = 12, + .argv = { "curl", "-L", "-f", "-o", partfile, + "--retry", "2", "--connect-timeout", "10", + "--retry-delay", "5", "--retry-connrefused", + NULL } }; struct cmdarray wgetcmd = { .argc = 3, -- cgit v1.2.3-70-g09d2