From 9c9d3c9937c282c01589c4baa4ff27cc485c0f97 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 13 Jan 2020 10:09:48 +0100 Subject: bin/nit-picker: complain about not-yet-removed packages, too --- bin/nit-picker | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'bin/nit-picker') diff --git a/bin/nit-picker b/bin/nit-picker index d66e82e..96101a8 100755 --- a/bin/nit-picker +++ b/bin/nit-picker @@ -184,6 +184,18 @@ while pgrep -x ii >/dev/null \ mysql_join_binary_packages_binary_packages_in_repositories mysql_join_binary_packages_in_repositories_repositories printf ' AND `repositories`.`is_on_master_mirror`;\n' + + printf 'SELECT DISTINCT' + printf ' "upstream-availability",' + printf '`binary_packages`.`pkgname`' + printf ' FROM `binary_packages`' + mysql_join_binary_packages_binary_packages_in_repositories + mysql_join_binary_packages_in_repositories_repositories + printf ' AND (' + printf '`repositories`.`is_on_master_mirror`' + printf ' OR `repositories`.`id`=%s' \ + "${repository_ids__any_build_list}" + printf ');\n' fi fi @@ -577,6 +589,45 @@ while pgrep -x ii >/dev/null \ fi fi ;; + 'upstream-availability') + upstream_mirror=$( + # shellcheck disable=SC2016 + sed ' + s/^\s*Server\s*=\s*\(\S\+\)\$arch\(\S*\)$/\1x86_64\2/ + t + d + ' '/etc/pacman.d/mirrorlist' \ + | head -n1 + ) + if [ -z "$( + # shellcheck disable=SC2154 + for repo in ${upstream_repository_names}; do + if [ "${repo}" = 'build-support' ]; then + continue + fi + if curl -s "$( + # shellcheck disable=SC2016 + printf '%s\n' "${upstream_mirror}" \ + | sed ' + s/\(\$repo\)/'"${repo}"'/ + s@/$@@ + s@$@/'"${repo}"'.db.tar.gz@ + ' + )" 2>/dev/null \ + | tar -tzf - 2>/dev/null \ + | grep '^'"$(str_to_regex "${parameters}")"'-[^-]\+-[^-]\+/desc$'; then + break + fi + done + )" ]; then + printf 'Package %s is still in our repositories or on the build-list, but is not available upstream.\n' \ + "${parameters}" \ + | local_irc_say + if [ $# -eq 0 ]; then + sleep 60 + fi + fi + ;; *) >&2 printf 'action "%s" is not yet implemented ...\n' "${action}" ;; -- cgit v1.2.3-70-g09d2