Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/nit-picker
diff options
context:
space:
mode:
Diffstat (limited to 'bin/nit-picker')
-rwxr-xr-xbin/nit-picker51
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}"
;;