diff options
-rwxr-xr-x | buildos | 23 |
1 files changed, 10 insertions, 13 deletions
@@ -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 |