diff options
author | Erich Eckner <git@eckner.net> | 2020-01-13 10:09:48 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-01-13 10:09:48 +0100 |
commit | 9c9d3c9937c282c01589c4baa4ff27cc485c0f97 (patch) | |
tree | d75ca4b88e253fdf451a84d2736f8a309d78a0f1 /bin/nit-picker | |
parent | fbf51f6703c5cdb1d722f3d4c2c661b7a57f9533 (diff) | |
download | builder-9c9d3c9937c282c01589c4baa4ff27cc485c0f97.tar.xz |
bin/nit-picker: complain about not-yet-removed packages, too
Diffstat (limited to 'bin/nit-picker')
-rwxr-xr-x | bin/nit-picker | 51 |
1 files changed, 51 insertions, 0 deletions
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}" ;; |