summaryrefslogtreecommitdiff
path: root/bin/return-assignment
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-09-26 10:15:02 +0200
committerErich Eckner <git@eckner.net>2018-09-26 10:15:02 +0200
commita4ff90865b0723c483edcf7cc484a36f56080cd3 (patch)
tree71723ed27331e513621784636b6dd5995f7be14c /bin/return-assignment
parent91198046801e3365ed384c19d3cba7724ba1ba93 (diff)
downloadbuilder-a4ff90865b0723c483edcf7cc484a36f56080cd3.tar.xz
bin/return-assignment: tell slave operator on irc about problems
Diffstat (limited to 'bin/return-assignment')
-rwxr-xr-xbin/return-assignment24
1 files changed, 20 insertions, 4 deletions
diff --git a/bin/return-assignment b/bin/return-assignment
index 9a999ae..ceb0dee 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -422,7 +422,11 @@ missing_files=$(
if [ -n "${missing_files}" ]; then
>&2 echo 'The following packages lack a signature, namcap log, package file or list of needed/provided libraries:'
- >&2 echo "${missing_files}"
+ printf '/j %s Your buildslave "%s" uploaded some incomplete package(s):\n' \
+ "${operator}" "${slave}" | \
+ sponge "${irc_dir}/in"
+ printf '%s\n' "${missing_files}" | \
+ irc_say "${operator}" 'copy' >&2
exit 3
fi
@@ -442,7 +446,11 @@ if [ -z "$(
uniq -d
)" ]; then
>&2 echo 'Signature(s) is/are not fully trusted:'
- >&2 printf '%s\n' "${signatures}"
+ printf '/j %s Your buildslave "%s" uploaded a package with a not fully-trusted signature:\n' \
+ "${operator}" "${slave}" | \
+ sponge "${irc_dir}/in"
+ printf '%s\n' "${signatures}" | \
+ irc_say "${operator}" 'copy' >&2
exit 3
fi
@@ -459,7 +467,11 @@ errors=$(
)
if [ -n "${errors}" ]; then
>&2 echo 'Packager error(s):'
- >&2 printf '%s' "${errors}"
+ printf '/j %s Your buildslave "%s" uploaded package(s) with invalid packager:\n' \
+ "${operator}" "${slave}" | \
+ sponge "${irc_dir}/in"
+ printf '%s\n' "${errors}" | \
+ irc_say "${operator}" 'copy' >&2
exit 3
fi
@@ -504,7 +516,11 @@ package_errors=$(
if [ -n "${package_errors}" ]; then
>&2 echo 'The following packages should have been built but are missing or vice versa:'
- >&2 echo "${package_errors}"
+ printf '/j %s Your buildslave "%s" uploaded the wrong package(s):\n' \
+ "${operator}" "${slave}" | \
+ sponge "${irc_dir}/in"
+ printf '%s\n' "${package_errors}" | \
+ irc_say "${operator}" 'copy' >&2
exit 4
fi