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:
authorErich Eckner <git@eckner.net>2018-03-22 15:19:23 +0100
committerErich Eckner <git@eckner.net>2018-03-22 15:19:23 +0100
commitc772be57eca3a2176ac3931c02fb582f85c0d575 (patch)
tree276bbc6566e141444d37ee464a0c9c6c0ac956fe /bin/modify-package-state
parente808f93c3f9af51fa32764d3195bbba33b73d026 (diff)
decommission package-states directory - we rely on the database now
Diffstat (limited to 'bin/modify-package-state')
-rwxr-xr-xbin/modify-package-state38
1 files changed, 0 insertions, 38 deletions
diff --git a/bin/modify-package-state b/bin/modify-package-state
index 76b8c1e..4a2f5ac 100755
--- a/bin/modify-package-state
+++ b/bin/modify-package-state
@@ -243,46 +243,8 @@ while read -r package reason; do
{
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`'
- mysql_join_binary_packages_repositories 'b'
- 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_run_query
- case "${action}" in
- 'block')
- printf '%s' "${reason}" > \
- "${work_dir}/package-states/${package}.blocked"
- ;;
- 'unblock')
- rm -f "${work_dir}/package-states/${package}.blocked"
- ;;
- 'faulty')
- find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 \
- -name '*.tested' \
- -exec grep -lxF "${package}" '{}' \; | \
- while read -r sf; do
- mv "${sf}" "${sf%ed}ing"
- done
- ;;
- 'tested')
- find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 \
- -name '*.testing' \
- -exec grep -lxF "${package}" '{}' \; | \
- while read -r sf; do
- mv "${sf}" "${sf%ing}ed"
- done
- ;;
- *)
- >&2 printf 'Whooops, action "%s" not implemented yet.\n' "${action}"
- exit 42
- ;;
- esac
printf '%s %s\n' "${action}" "${package}"
fi
done \