From 4ee5232fc2d08093bd54288ceda47db10d8f83fe Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 5 Jan 2025 19:07:56 +0100 Subject: fall back to non-cached variant if cache has an error --- lib/common-functions | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/common-functions b/lib/common-functions index f13b1f2..4ec35f3 100755 --- a/lib/common-functions +++ b/lib/common-functions @@ -212,6 +212,11 @@ make_source_info_using_cache() { curl -LSs "https://buildmaster.archlinux32.org/pkginfo/${package}=${repository}=${git_revision}=${mod_git_revision}" \ >"${output}" + + if grep -qxF 'curl: (22) The requested URL returned error: 500' "${output}"; then + >&2 echo 'cache returned error, falling back to make_source_info directly' + make_source_info "$1" "$2" "$3" "$4" "$5" + fi } # make_source_info $package $repository $git_revision $mod_git_revision $output -- cgit v1.2.3-70-g09d2