Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-12-19 10:33:02 +0100
committerErich Eckner <git@eckner.net>2019-12-19 10:33:02 +0100
commit6e2f019530f75f45538a70642a66a5f1b57f3e37 (patch)
tree100cda942353477ffbd1a20f8972cbb36920829b
parentb09dbb58b5613c474b5a713a5a7229ce3c1f11d5 (diff)
bin/nit-picker: check if all parts of a split package with identical architecture are in repositories of equal stability
-rwxr-xr-xbin/nit-picker51
1 files changed, 51 insertions, 0 deletions
diff --git a/bin/nit-picker b/bin/nit-picker
index 1c87a9c..e073439 100755
--- a/bin/nit-picker
+++ b/bin/nit-picker
@@ -168,6 +168,15 @@ while pgrep -x ii >/dev/null \
printf '`build_slaves`.`name`'
printf ' FROM `build_slaves`'
printf ';\n'
+
+ printf 'SELECT DISTINCT'
+ printf ' "package-blob",'
+ printf '`binary_packages`.`build_assignment`,'
+ printf '`repositories`.`architecture`'
+ printf ' FROM `binary_packages`'
+ mysql_join_binary_packages_binary_packages_in_repositories
+ mysql_join_binary_packages_in_repositories_repositories
+ printf ' AND `repositories`.`is_on_master_mirror`;\n'
fi
fi
@@ -505,6 +514,48 @@ while pgrep -x ii >/dev/null \
rm "${tmp_dir}/${parameters}"
rm -rf --one-file-system "${tmp_dir}/gpg-home" "${tmp_dir}/pkg"
;;
+ 'package-blob')
+ infos=$(
+ # shellcheck disable=SC2016
+ {
+ printf 'SELECT DISTINCT'
+ printf ' CONCAT('
+ printf '`architectures`.`name`,'
+ printf '"/",'
+ printf '`package_sources`.`pkgbase`'
+ printf '),'
+ printf '`repository_stabilities`.`name`'
+ printf ' FROM `binary_packages`'
+ mysql_join_binary_packages_build_assignments
+ printf ' AND `build_assignments`.`id`=%s' \
+ "${parameters% *}"
+ mysql_join_build_assignments_package_sources
+ mysql_join_binary_packages_binary_packages_in_repositories
+ mysql_join_binary_packages_in_repositories_repositories
+ printf ' AND `repositories`.`is_on_master_mirror`'
+ printf ' AND `repositories`.`architecture`=%s' \
+ "${parameters#* }"
+ mysql_join_repositories_repository_stabilities
+ mysql_join_repositories_architectures
+ printf ';\n'
+ } \
+ | mysql_run_query \
+ | tr '\t' ' '
+ )
+ # 0 is ok, too - then the package was removed in the meantime
+ if [ "$(printf '%s\n' "${infos}" | wc -l)" -gt 1 ]; then
+ printf '%s\n' \
+ "${infos}" \
+ | sed '
+ :a
+ $! N
+ s/\n\S\+ /, /
+ ta
+ s/^\S\+ /parts of \0are in differently-stable repositories: /
+ ' \
+ | local_irc_say
+ fi
+ ;;
*)
>&2 printf 'action "%s" is not yet implemented ...\n' "${action}"
;;