summaryrefslogtreecommitdiff
path: root/bin/interpret-mail
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-10-25 14:49:48 +0200
committerErich Eckner <git@eckner.net>2017-10-25 14:49:48 +0200
commit2a0ee7c76a45563ace70bc892b23ba326e3a6421 (patch)
treea24b98b424d3c6d649ec73f7f82cb4830236100a /bin/interpret-mail
parent25fb200ccb01a8564ad6f3a62fad02e3abe3c45e (diff)
downloadbuilder-2a0ee7c76a45563ace70bc892b23ba326e3a6421.tar.xz
bin/sanity-check, bin/return-assignment, bin/interpret-mail: state-file suffix "tested" new
Diffstat (limited to 'bin/interpret-mail')
-rwxr-xr-xbin/interpret-mail15
1 files changed, 9 insertions, 6 deletions
diff --git a/bin/interpret-mail b/bin/interpret-mail
index e515b3c..ef19d4a 100755
--- a/bin/interpret-mail
+++ b/bin/interpret-mail
@@ -20,7 +20,7 @@ if [ $# -ne 0 ]; then
>&2 echo ' Block the given packge for the given reason.'
>&2 echo ''
>&2 echo ' - "stabilize: <package-file>":'
- >&2 echo ' Move the given package from testing to stable.'
+ >&2 echo ' Mark the given package as tested.'
>&2 echo ''
>&2 echo ' - "unblock: <state-file>":'
>&2 echo ' Unblock the given packge.'
@@ -191,11 +191,14 @@ if [ -s "${tmp_dir}/stabilize" ]; then
sed -i '
/\.pkg\.tar\.xz$/!s/$/.pkg.tar.xz/
' "${tmp_dir}/stabilize"
- if run_and_log_on_error "${base_dir}/bin/db-update" -b -f "${tmp_dir}/stabilize"; then
- log 'Successfully stabilized %s packages.\n' "$(wc -l < "${tmp_dir}/stabilize")"
- else
- log 'There was an error while stabilizing the packages - ignoring this message.\n'
- fi
+ 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
+ log 'Successfully stabilized %s packages.\n' "$(wc -l < "${tmp_dir}/stabilized")"
fi
if [ -s "${tmp_dir}/unblock" ]; then