summaryrefslogtreecommitdiff
path: root/bin/interpret-mail
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-11-01 13:23:18 +0100
committerErich Eckner <git@eckner.net>2017-11-01 13:23:18 +0100
commit5ed02366d13409491a292ea6946ee59339a0e228 (patch)
treeb12ee527a53ec345dea27706569f3e512368fdf9 /bin/interpret-mail
parent5b8ddbb077b90647d8010ad5e03f933e00d5e731 (diff)
downloadbuilder-5ed02366d13409491a292ea6946ee59339a0e228.tar.xz
bin/block-package -> bin/modify-package-state ("--tested" new)
Diffstat (limited to 'bin/interpret-mail')
-rwxr-xr-xbin/interpret-mail19
1 files changed, 8 insertions, 11 deletions
diff --git a/bin/interpret-mail b/bin/interpret-mail
index b754e59..5ddf69a 100755
--- a/bin/interpret-mail
+++ b/bin/interpret-mail
@@ -180,7 +180,7 @@ sed -n "$(
)" "${tmp_dir}/raw-content"
if [ -s "${tmp_dir}/block" ]; then
- if run_and_log_on_error "${base_dir}/bin/block-package" "${tmp_dir}/block"; then
+ if run_and_log_on_error "${base_dir}/bin/modify-package-state" --block "${tmp_dir}/block"; then
if [ -s "${tmp_dir}/block" ]; then
log 'Successfully blocked %s packages.\n' "$(wc -l < "${tmp_dir}/block")"
fi
@@ -193,20 +193,17 @@ if [ -s "${tmp_dir}/stabilize" ]; then
sed -i '
/\.pkg\.tar\.xz$/!s/$/.pkg.tar.xz/
' "${tmp_dir}/stabilize"
- find "${work_dir}/package-states" -maxdepth 1 -type f -name '*.testing' \
- -exec grep -qxF -f "${tmp_dir}/stabilize" '{}' \; \
- -printf '%p\n' | \
- tee "${tmp_dir}/stabilized" | \
- while read -r sf; do
- mv "${sf}" "${sf%.testing}.tested"
- done
- if [ -s "${tmp_dir}/stabilized" ]; then
- log 'Successfully stabilized %s packages.\n' "$(wc -l < "${tmp_dir}/stabilized")"
+ if run_and_log_on_error "${base_dir}/bin/modify-package-state" --tested "${tmp_dir}/stabilize"; then
+ if [ -s "${tmp_dir}/stabilize" ]; then
+ log 'Successfully marked %s packages as tested.\n' "$(wc -l < "${tmp_dir}/stabilize")"
+ fi
+ else
+ log 'There was an error while marking the packages as tested - ignoring this message.\n'
fi
fi
if [ -s "${tmp_dir}/unblock" ]; then
- if run_and_log_on_error "${base_dir}/bin/block-package" -u "${tmp_dir}/unblock"; then
+ if run_and_log_on_error "${base_dir}/bin/modify-package-state" --unblock "${tmp_dir}/unblock"; then
if [ -s "${tmp_dir}/unblock" ]; then
log 'Successfully unblocked %s packages.\n' "$(wc -l < "${tmp_dir}/unblock")"
fi