From ab09c0383c10374ddcc587f60f36a88daabe9b42 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 28 Jan 2018 20:49:10 +0100 Subject: bin/get-package-updates: talk to irc channel if too many packages will be blacklisted --- bin/get-package-updates | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'bin/get-package-updates') diff --git a/bin/get-package-updates b/bin/get-package-updates index 320cec1..ce3de0a 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -564,8 +564,24 @@ deletion_list_count=$( if [ "${deletion_list_count}" -gt 1000 ]; then >&2 printf 'There are %s > 1000 packages on the deletion-list. This does not seem right.\n' \ "${deletion_list_count}" + if [ ! -s "${work_dir}/told-irc-about-too-many-deletion-list-packages" ]; then + { + printf '\001ACTION refuses to blacklist %s packages.\001\n' "${deletion_list_count}" + for repo_name in ${repo_names}; do + if ! diff -q "${work_dir}/${repo_name}.revision" "${work_dir}/${repo_name}.revision.new" >/dev/null; then + printf '%s: %s -> %s\n' \ + "${repo_name}" \ + "$(cat "${work_dir}/${repo_name}.revision")" \ + "$(cat "${work_dir}/${repo_name}.revision.new")" + fi + done + } | \ + tee "${work_dir}/told-irc-about-too-many-deletion-list-packages" | \ + sponge "${irc_dir}/#archlinux-ports/in" + fi exit 3 fi +rm -f "${work_dir}/told-irc-about-too-many-deletion-list-packages" # Move the .new-files to the actual files -- cgit v1.2.3-54-g00ecf