You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by li...@apache.org on 2023/05/10 12:10:43 UTC
[arrow-adbc] branch main updated: feat(dev/release): Retry on apt failure in the RC verification script (#672)
This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git
The following commit(s) were added to refs/heads/main by this push:
new 408f476 feat(dev/release): Retry on apt failure in the RC verification script (#672)
408f476 is described below
commit 408f476162ab734631ff02ffa958d487a6e1c60c
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Wed May 10 21:10:37 2023 +0900
feat(dev/release): Retry on apt failure in the RC verification script (#672)
Fixes #671.
---
dev/release/verify-apt.sh | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/dev/release/verify-apt.sh b/dev/release/verify-apt.sh
index 128118c..b65e4d3 100755
--- a/dev/release/verify-apt.sh
+++ b/dev/release/verify-apt.sh
@@ -45,9 +45,21 @@ echo "::group::Prepare repository"
export DEBIAN_FRONTEND=noninteractive
-APT_INSTALL="apt install -y -V --no-install-recommends"
-
-apt update
+retry() {
+ local n_tries=2
+ while [ ${n_tries} -gt 0 ]; do
+ if "$@"; then
+ return
+ fi
+ n_tries=$((${n_tries} - 1))
+ done
+ "$@"
+}
+
+APT_UPDATE="retry apt update --error-on=any"
+APT_INSTALL="retry apt install -y -V --no-install-recommends"
+
+${APT_UPDATE}
${APT_INSTALL} \
ca-certificates \
curl \
@@ -127,7 +139,7 @@ else
esac
fi
-apt update
+${APT_UPDATE}
echo "::endgroup::"