summaryrefslogtreecommitdiff
path: root/bin/modify-package-state
diff options
context:
space:
mode:
Diffstat (limited to 'bin/modify-package-state')
-rwxr-xr-xbin/modify-package-state27
1 files changed, 27 insertions, 0 deletions
diff --git a/bin/modify-package-state b/bin/modify-package-state
index 5e4face..3ae5c58 100755
--- a/bin/modify-package-state
+++ b/bin/modify-package-state
@@ -235,6 +235,33 @@ while read -r package reason; do
grep -qxF '1'; then
printf 'UPDATE %s SET %s %s' "${combiner}" "${modifier}" "${selector}" | \
${mysql_command}
+ case "${action}" in
+ 'block')
+ printf '%s' "${reason}" > \
+ "${work_dir}/package-states/${package}.blocked"
+ ;;
+ 'unblock')
+ rm -f "${work_dir}/package-states/${package}.blocked"
+ ;;
+ 'faulty')
+ if [ -f "${work_dir}/package-states/${package}.tested" ]; then
+ mv \
+ "${work_dir}/package-states/${package}.tested" \
+ "${work_dir}/package-states/${package}.testing"
+ fi
+ ;;
+ 'tested')
+ if [ -f "${work_dir}/package-states/${package}.testing" ]; then
+ mv \
+ "${work_dir}/package-states/${package}.testing" \
+ "${work_dir}/package-states/${package}.tested"
+ fi
+ ;;
+ *)
+ >&2 printf 'Whooops, action "%s" not implemented yet.\n' "${action}"
+ exit 42
+ ;;
+ esac
fi
done \
< "${input_file}" \