aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2024-01-10 07:24:53 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2024-01-10 07:24:53 +0100
commitc29fbdb8c8b98b1cc677e575c8142b1a5289bbc5 (patch)
tree1efbb3b9c13762c134f4a92257bfc693308f2514
parentAdd more progs from livegui (diff)
downloadbinhost-c29fbdb8c8b98b1cc677e575c8142b1a5289bbc5.tar.gz
binhost-c29fbdb8c8b98b1cc677e575c8142b1a5289bbc5.tar.bz2
binhost-c29fbdb8c8b98b1cc677e575c8142b1a5289bbc5.zip
Better fail detection logic
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
-rwxr-xr-xbuilders/demeter/binhost-update7
-rwxr-xr-xbuilders/jiji/binhost-update7
2 files changed, 10 insertions, 4 deletions
diff --git a/builders/demeter/binhost-update b/builders/demeter/binhost-update
index 9e6822b..9ea2afc 100755
--- a/builders/demeter/binhost-update
+++ b/builders/demeter/binhost-update
@@ -92,6 +92,8 @@ echo Syncing host &>> ${TMPFILE}
emerge --sync -q &>> ${TMPFILE}
+anyfail=0
+
for n in ${NSPAWN_NAMES} ; do
echo Machine ${n} &>> ${TMPFILE}
echo &>> ${TMPFILE}
@@ -99,6 +101,7 @@ for n in ${NSPAWN_NAMES} ; do
git pull -q &>> ${TMPFILE}
cd /root &>> ${TMPFILE}
systemd-nspawn --bind /var/cache/distfiles --bind-ro /var/db/repos/gentoo --tmpfs=/var/tmp:mode=1777,size=32g -M ${n} /root/bin/run-update &>> ${TMPFILE}
+ let "anyfail+=$?"
done
@@ -106,9 +109,9 @@ upsync_binpackages /var/lib/machines/binhost-amd64-x86-64-kde/var/cache/binpkgs
upsync_binpackages /var/lib/machines/binhost-amd64-x86-64-v3-kde/var/cache/binpkgs amd64/17.1/x86-64-v3 &>> ${TMPFILE}
-if [[ $(wc -l ${TMPFILE} | sed -e 's: .*$::g') -gt ${MAX_HARMLESS} ]] ; then
+if [[ ${anyfail} -gt 0 ]] ; then
- send_email "Update possibly failed" "Binhost ${BINHOST_NAME} update produced long output" ${TMPFILE}
+ send_email "Update failed" "Binhost ${BINHOST_NAME} update failed in at least one nspawn" ${TMPFILE}
fi
diff --git a/builders/jiji/binhost-update b/builders/jiji/binhost-update
index f9d1b7b..0becbb9 100755
--- a/builders/jiji/binhost-update
+++ b/builders/jiji/binhost-update
@@ -92,6 +92,8 @@ echo Syncing host &>> ${TMPFILE}
emerge --sync -q &>> ${TMPFILE}
+anyfail=0
+
for n in ${NSPAWN_NAMES} ; do
echo Machine ${n} &>> ${TMPFILE}
echo &>> ${TMPFILE}
@@ -99,14 +101,15 @@ for n in ${NSPAWN_NAMES} ; do
git pull -q &>> ${TMPFILE}
cd /root &>> ${TMPFILE}
systemd-nspawn --bind /var/cache/distfiles --bind-ro /var/db/repos/gentoo --tmpfs=/var/tmp:mode=1777,size=64g -M ${n} /root/bin/run-update &>> ${TMPFILE}
+ let "anyfail+=$?"
done
upsync_binpackages /var/lib/machines/binhost-arm64-kde/var/cache/binpkgs arm64/17.0/arm64 &>> ${TMPFILE}
upsync_binpackages /var/lib/machines/binhost-arm64-kde-23/var/cache/binpkgs arm64/23.0/arm64 &>> ${TMPFILE}
-if [[ $(wc -l ${TMPFILE} | sed -e 's: .*$::g') -gt ${MAX_HARMLESS} ]] ; then
+if [[ ${anyfail} -gt 0 ]] ; then
- send_email "Update possibly failed" "Binhost ${BINHOST_NAME} update produced long output" ${TMPFILE}
+ send_email "Update failed" "Binhost ${BINHOST_NAME} update failed in at least one nspawn" ${TMPFILE}
fi