Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/build-master-status-from-mysql2
-rwxr-xr-xbin/get-package-updates2
-rwxr-xr-xbin/return-assignment28
-rwxr-xr-xbin/sanity-check4
-rwxr-xr-xlib/common-functions8
-rwxr-xr-xlib/mysql-functions2
6 files changed, 26 insertions, 20 deletions
diff --git a/bin/build-master-status-from-mysql b/bin/build-master-status-from-mysql
index 729375f..e4dd313 100755
--- a/bin/build-master-status-from-mysql
+++ b/bin/build-master-status-from-mysql
@@ -249,7 +249,7 @@ find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 \
if [ -s "${webserver_directory}/mysql-sanity.html" ] && \
[ ! -s "${work_dir}/build-master-sanity" ]; then
printf 'oh girls, my database is dirty again ...\n' | \
- sponge "${irc_dir}/#archlinux32/in"
+ irc_say
echo 'build master is insane' > \
"${work_dir}/build-master-sanity"
fi
diff --git a/bin/get-package-updates b/bin/get-package-updates
index d3cb140..a6c3f32 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -480,7 +480,7 @@ if [ "${deletion_list_count}" -gt 1000 ]; then
done
} | \
tee "${work_dir}/told-irc-about-too-many-deletion-list-packages" | \
- sponge "${irc_dir}/#archlinux32/in"
+ irc_say
fi
exit 3
fi
diff --git a/bin/return-assignment b/bin/return-assignment
index 417654b..c259f1c 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -222,21 +222,19 @@ if [ "$5" = 'ERROR' ]; then
fi
)
- if [ -p "${irc_dir}/#archlinux32/in" ]; then
- {
- printf '%s is broken (says %s).' \
- "$1" \
- "${slave}"
- if [ -n "${rescheduled_packages}" ]; then
- printf -- ' - I rescheduled:'
- # shellcheck disable=SC2086
- printf ' %s,' ${rescheduled_packages} | \
- sed 's/,$/./'
- fi
- printf '\n'
- } | \
- sponge "${irc_dir}/#archlinux32/in"
- fi
+ {
+ printf '%s is broken (says %s).' \
+ "$1" \
+ "${slave}"
+ if [ -n "${rescheduled_packages}" ]; then
+ printf -- ' - I rescheduled:'
+ # shellcheck disable=SC2086
+ printf ' %s,' ${rescheduled_packages} | \
+ sed 's/,$/./'
+ fi
+ printf '\n'
+ } | \
+ irc_say
fi
exit 0
diff --git a/bin/sanity-check b/bin/sanity-check
index d98332c..9615ac7 100755
--- a/bin/sanity-check
+++ b/bin/sanity-check
@@ -22,7 +22,7 @@ usage() {
i_am_insane() {
if [ ! -s "${work_dir}/build-master-sanity" ]; then
printf '\001ACTION goes insane.\001\n' | \
- sponge "${irc_dir}/#archlinux32/in"
+ irc_say
fi
echo 'build master is insane' > \
"${work_dir}/build-master-sanity"
@@ -432,5 +432,5 @@ done
if [ -f "${work_dir}/build-master-sanity" ]; then
rm "${work_dir}/build-master-sanity"
printf '\001ACTION resumes sanity.\001\n' | \
- sponge "${irc_dir}/#archlinux32/in"
+ irc_say
fi
diff --git a/lib/common-functions b/lib/common-functions
index 1abe7bc..aa32409 100755
--- a/lib/common-functions
+++ b/lib/common-functions
@@ -1390,3 +1390,11 @@ extract_pkgname_epoch_pkgver_pkgrel_sub_pkgrel_arch_from_package_name() {
epoch="${epoch%%:*}"
fi
}
+
+# irc_say
+# say content of stdin in irc channel
+irc_say() {
+ if [ -p "${irc_dir}/#archlinux32/in" ]; then
+ sponge "${irc_dir}/#archlinux32/in"
+ fi
+}
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 0b21bdf..801eca2 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -83,7 +83,7 @@ mysql_run_query() {
if [ ! -s "${work_dir}/build-master-sanity" ]; then
printf '\001ACTION failed to execute a mysql query - can you have a look at "%s"?.\001\n' \
"${query_file##*/}" \
- | sponge "${irc_dir}/#archlinux32/in"
+ | irc_say
fi
echo 'A mysql query failed.' > \
"${work_dir}/build-master-sanity"