From fb77df17de8de4535638b747956622b5640f78f8 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 2 Feb 2018 10:29:15 +0100 Subject: bin/modify-package-state: binary packages are identified by version, thus we need to dig for the git revisions --- bin/modify-package-state | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/bin/modify-package-state b/bin/modify-package-state index dec3013..a3b23f3 100755 --- a/bin/modify-package-state +++ b/bin/modify-package-state @@ -241,18 +241,22 @@ while read -r package reason; do 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 + 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') - if [ -f "${work_dir}/package-states/${package}.testing" ]; then - mv \ - "${work_dir}/package-states/${package}.testing" \ - "${work_dir}/package-states/${package}.tested" - fi + echo "pkg: ${package}" >&2 + find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 \ + -name '*.testing' \ + -exec grep -lxF "${package}" '{}' \; | \ + while read -r sf; do + echo "sf: ${sf}" >&2 + mv "${sf}" "${sf%ing}ed" + done ;; *) >&2 printf 'Whooops, action "%s" not implemented yet.\n' "${action}" -- cgit v1.2.3-70-g09d2