diff options
author | Erich Eckner <git@eckner.net> | 2018-01-28 20:49:10 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-01-28 20:49:10 +0100 |
commit | ab09c0383c10374ddcc587f60f36a88daabe9b42 (patch) | |
tree | b0c80370e19205c762f6ee6c29bd1447a20f39c7 /bin/get-package-updates | |
parent | c5999ea29f2ad3bc6513aaf0f740a2ed03f10e8c (diff) | |
download | builder-ab09c0383c10374ddcc587f60f36a88daabe9b42.tar.xz |
bin/get-package-updates: talk to irc channel if too many packages will be blacklisted
Diffstat (limited to 'bin/get-package-updates')
-rwxr-xr-x | bin/get-package-updates | 16 |
1 files changed, 16 insertions, 0 deletions
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 |