aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-10-19 15:20:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-10-19 15:20:25 +0200
commit061e9960bbccf8d55a42d1106eaa8088c87a8551 (patch)
treea4a62ac2cb4850ade5c7dd63c0066afd6289599a
parent7297a007189a8763c082fe75a1da83fcb8c0ed27 (diff)
Use bpkg --fetch-timeout instead of forcing curl
-rwxr-xr-xbuildos23
1 files changed, 10 insertions, 13 deletions
diff --git a/buildos b/buildos
index 0bd47d5..e16d853 100755
--- a/buildos
+++ b/buildos
@@ -33,17 +33,13 @@ function error ()
# (5 attempts total). These are similar to bbot timeouts. Note that the
# toolchain archives can be quite sizable.
#
-curl=(curl -f -L -s -S \
- --retry 4 \
- --retry-max-time 600 \
- --max-time 600 \
- --connect-timeout 60)
+timeout=600
-bpkg=(bpkg --fetch curl \
- --fetch-option --retry --fetch-option 4 \
- --fetch-option --retry-max-time --fetch-option 600 \
- --fetch-option --max-time --fetch-option 600 \
- --fetch-option --connect-timeout --fetch-option 60)
+curl=(curl -f -L -s -S \
+ --retry 4 \
+ --retry-max-time "$timeout" \
+ --max-time "$timeout" \
+ --connect-timeout 60)
info "starting build os monitor..."
@@ -678,7 +674,7 @@ function bbot_check () # <toolchain-name>
l_stat="$(bpkg status libbbot)"
b_stat="$(bpkg status bbot)"
- if ! "${bpkg[@]}" fetch -q; then
+ if ! bpkg --fetch-timeout "$timeout" fetch -q; then
info "failed to fetch package information"
break
fi
@@ -756,8 +752,9 @@ function bbot_start () # <toolchain-name> <toolchain-index>
# Build and install the bbot agent. Since other agents might already
# be running, limit the number of jobs to our slice.
#
- if ! "${bpkg[@]}" --build-option --jobs --build-option "$cpu_slice" \
- build --yes libbbot bbot; then
+ if ! bpkg --fetch-timeout "$timeout" \
+ --build-option --jobs --build-option "$cpu_slice" \
+ build --yes libbbot bbot; then
info "failed to build bbot-agent@$tn"
break
fi