aboutsummaryrefslogtreecommitdiff
path: root/buildos
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-05-08 18:43:55 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-05-08 18:43:55 +0200
commit70af907ebe84d2f92364b64e693349b65b8c6fdf (patch)
tree2f4e81ec2be1d06ad6e51d883e5999e94e125a6d /buildos
parent5e8065cf7e9cc632d7f1addae79da10b81c171c9 (diff)
Clean up buildos monitor diagnostics
Diffstat (limited to 'buildos')
-rwxr-xr-xbuildos31
1 files changed, 16 insertions, 15 deletions
diff --git a/buildos b/buildos
index 25029b0..8dfd3d3 100755
--- a/buildos
+++ b/buildos
@@ -473,11 +473,12 @@ function toolchain_checksum () # <toolchain-prefix> <file>
# Fetch a file from the sums file into $toolchain_root, verify its checksum,
# and make a predictable name (without version) symlink.
#
-function toolchain_fetch () # <toolchain-prefix> <line>
+function toolchain_fetch () # <toolchain-name> <line>
{
- local s p f u l tp tu tr tv
+ local s p f u l tn tp tu tr tv
- tp="$1"
+ tn="$1"
+ tp="${toolchains["$tn"]}"
tu="$(toolchain_value "$tp" toolchain_url)"
tr="$(toolchain_value "$tp" toolchain_root)"
@@ -503,7 +504,7 @@ function toolchain_fetch () # <toolchain-prefix> <line>
return 1
fi
- info "toolchain version $tv"
+ info "toolchain '$tn' version $tv"
declare -g "${tp}toolchain_fver=$tv" # Full version.
echo "$tv" >"$tr/version-full"
@@ -585,7 +586,7 @@ function toolchain_bootstrap () # <toolchain-name>
fi
for l in "${ls[@]}"; do
- if ! toolchain_fetch "$tp" "$l"; then
+ if ! toolchain_fetch "$tn" "$l"; then
return 2 # Diagnostics has already been issued.
fi
done
@@ -737,12 +738,12 @@ function bbot_start () # <toolchain-name> <toolchain-index>
#
if ! bpkg build --build-option --jobs --build-option "$cpu_slice" \
--yes libbbot bbot; then
- info "failed to build bbot agent"
+ info "failed to build bbot-agent@$tn"
break
fi
if ! bpkg install "${vars[@]}" bbot; then
- info "failed to install bbot agent"
+ info "failed to install bbot-agent@$tn"
break
fi
@@ -796,7 +797,7 @@ function bbot_start () # <toolchain-name> <toolchain-index>
print_diag 1>&2
if [ -n "$fail" ]; then
- info "correct and start bbot agent (systemctl start bbot-agent@$tn)"
+ info "correct and start bbot-agent@$tn (systemctl start bbot-agent@$tn)"
break
fi
fi
@@ -864,11 +865,11 @@ while true; do
cs="$(toolchain_checksum "$tp" "$f")"
if [ "$ts" != "$cs" ]; then
- email "rebooting because of new $tn toolchain" <<EOF
+ email "rebooting because of new '$tn' toolchain" <<EOF
old_checksum: $ts
new_checksum: $cs
EOF
- info "new $tn toolchain ($cs), rebooting..."
+ info "new '$tn' toolchain ($cs), rebooting..."
restart
fi
else
@@ -883,7 +884,7 @@ EOF
# subshell and any variables it sets (like toolchain_ver) won't be
# visible to us.
#
- info "bootstrapping $tn toolchain..."
+ info "bootstrapping '$tn' toolchain..."
toolchain_bootstrap "$tn" 2>&1 | tee "$tr/toolchain-$count.log" 1>&2
@@ -895,15 +896,15 @@ EOF
tv="$(cat $tr/version-full)"
declare "${tp}toolchain_fver=$tv"
- s="bootstrapped $tn toolchain $tv"
+ s="bootstrapped '$tn' toolchain $tv"
toolchain_boots+=("$tn")
;;
1)
- s="skipping disabled $tn toolchain, waiting for new version"
+ s="skipping disabled '$tn' toolchain, waiting for new version"
toolchain_boots+=("") # Skip.
;;
*)
- s="failed to bootstrap $tn toolchain, waiting for new version"
+ s="failed to bootstrap '$tn' toolchain, waiting for new version"
toolchain_boots+=("") # Skip.
;;
esac
@@ -1019,7 +1020,7 @@ EOF
fi
;;
*)
- s="failed to fetch package information for $tn, will try again"
+ s="failed to fetch package information for '$tn' toolchain, will try again"
;;
esac