index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2023-03-28 08:25:13 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2023-03-28 08:25:13 +0200 |
commit | 08b7d94d1c2d3736b99b97693486fe189bf7d9e1 (patch) | |
tree | c072b7919781176bc8325fac83248a3d136e0661 | |
parent | 6110f48a678a2c1a536d8ef4c08f307873df0fc1 (diff) |
-rwxr-xr-x | bin/manual-fix | 44 |
diff --git a/bin/manual-fix b/bin/manual-fix new file mode 100755 index 0000000..c057f92 --- /dev/null +++ b/bin/manual-fix @@ -0,0 +1,44 @@ +#!/bin/bash + +# shellcheck disable=SC2119,SC2120 + +# shellcheck source=../lib/load-configuration +#. "${0%/*}/../lib/load-configuration" + +_fix_package_on_build_and_deletion_list() { + { + printf 'DELETE `bin_del`' + printf ' FROM `binary_packages` AS `bin_del`' + mysql_join_binary_packages_binary_packages_in_repositories 'bin_del' 'bir_del' + mysql_join_binary_packages_in_repositories_repositories 'bir_del' 'r_del' + printf ' AND `r_del`.`name`="deletion-list"' + printf ' JOIN `binary_packages` AS `bin_keep`' + printf ' ON `bin_keep`.`pkgname`=`bin_del`.`pkgname`' + printf ' AND `bin_del`.`architecture`=`bin_keep`.`architecture`' + printf ' AND `bin_del`.`id`!=`bin_keep`.`id`' + printf ' AND `bin_keep`.`sha512sum` IS NULL' + mysql_join_binary_packages_binary_packages_in_repositories 'bin_keep' 'bir_keep' + mysql_join_binary_packages_in_repositories_repositories 'bir_keep' 'r_keep' + printf ' AND `r_keep`.`name`="build-list"' + } \ + | mysql_run_query +} + +usage() { + >&2 printf 'usage: %s $issue\n\n' "${0##*/}" + >&2 printf 'Manually fix an issue.\n\n' + >&2 printf 'fixable issues:\n' + declare -F \ + | sed ' + s@^declare -f _fix_@ @ + t + d + ' >&2 + exit 1 +} + +if [ $# -ne 1 ] || ! declare -f "_fix_$1" >/dev/null; then + usage +fi + +eval "_fix_$1" |