summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-01-11 09:40:51 +0100
committerErich Eckner <git@eckner.net>2018-01-11 09:40:51 +0100
commitee70d5b77671854bb91c614b09936455df80ddb5 (patch)
treea047f046f27265cb57290afaef75d024559a8cf5 /bin
parentb51f71dd49271cbaa7b194aba3b0f37c38cf4f27 (diff)
downloadbuilder-ee70d5b77671854bb91c614b09936455df80ddb5.tar.xz
bin/return-assignment: only speak in irc if nothing was rescheduled
Diffstat (limited to 'bin')
-rwxr-xr-xbin/return-assignment23
1 files changed, 16 insertions, 7 deletions
diff --git a/bin/return-assignment b/bin/return-assignment
index 1da8a98..b8c6cca 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -67,12 +67,10 @@ if [ "$5" = 'ERROR' ]; then
--transform="s|^|$1.$2.$3.$4.|" \
'*.build-log.gz'
- if [ ! -f "${work_dir}/package-states/$1.$2.$3.$4.broken" ] && \
- [ -p "${irc_dir}/#archlinux-ports/in" ]; then
- printf '%s is broken (says %s).\n' \
- "$1" \
- "${slave}" > \
- "${irc_dir}/#archlinux-ports/in"
+ if [ ! -f "${work_dir}/package-states/$1.$2.$3.$4.broken" ]; then
+ was_broken_before=false
+ else
+ was_broken_before=true
fi
# shellcheck disable=SC2154
@@ -130,7 +128,18 @@ if [ "$5" = 'ERROR' ]; then
)
if [ -n "${haskell_rebuild_packages}" ]; then
# shellcheck disable=SC2086
- "${base_dir}/bin/seed-build-list" ${haskell_rebuild_packages}
+ if [ -n "$("${base_dir}/bin/seed-build-list" ${haskell_rebuild_packages})" ]; then
+ # something was rescheduled, so we don't want to say it on the irc channel
+ was_broken_before=false
+ fi
+ fi
+
+ if ! ${was_broken_before} && \
+ [ -p "${irc_dir}/#archlinux-ports/in" ]; then
+ printf '%s is broken (says %s).\n' \
+ "$1" \
+ "${slave}" > \
+ "${irc_dir}/#archlinux-ports/in"
fi
exit 0