Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/modify-package-state
diff options
context:
space:
mode:
Diffstat (limited to 'bin/modify-package-state')
-rwxr-xr-xbin/modify-package-state16
1 files changed, 15 insertions, 1 deletions
diff --git a/bin/modify-package-state b/bin/modify-package-state
index 0703238..b2d3133 100755
--- a/bin/modify-package-state
+++ b/bin/modify-package-state
@@ -230,7 +230,21 @@ while read -r package reason; do
${mysql_command} --raw --batch | \
sed '1d' | \
grep -qxF '1'; then
- printf 'UPDATE %s SET %s %s' "${combiner}" "${modifier}" "${selector}" | \
+ # shellcheck disable=SC2016
+ {
+ printf 'UPDATE %s SET %s %s' "${combiner}" "${modifier}" "${selector}"
+ printf ';\n'
+ # TODO: remove the below part, once the database if fully functional
+ printf 'UPDATE `binary_packages` AS `a`'
+ printf ' JOIN `binary_packages` AS `b`'
+ printf ' ON `a`.`build_assignment`=`b`.`build_assignment`'
+ printf ' JOIN `repositories`'
+ printf ' ON `b`.`repository`=`repositories`.`id`'
+ printf ' SET `b`.`is_tested`=1'
+ printf ' WHERE `a`.`is_tested`'
+ printf ' AND NOT `b`.`is_tested`'
+ printf ' AND NOT `repositories`.`name`="deletion-list";\n'
+ } | \
${mysql_command}
case "${action}" in
'block')