From 2a0ee7c76a45563ace70bc892b23ba326e3a6421 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 25 Oct 2017 14:49:48 +0200 Subject: bin/sanity-check, bin/return-assignment, bin/interpret-mail: state-file suffix "tested" new --- bin/interpret-mail | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'bin/interpret-mail') 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: ":' - >&2 echo ' Move the given package from testing to stable.' + >&2 echo ' Mark the given package as tested.' >&2 echo '' >&2 echo ' - "unblock: ":' >&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 -- cgit v1.2.3