diff options
author | Erich Eckner <git@eckner.net> | 2018-02-02 10:29:15 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-02-02 10:29:15 +0100 |
commit | fb77df17de8de4535638b747956622b5640f78f8 (patch) | |
tree | f669e1e936c7e0c85f7119c1e29063a1b0b759a5 | |
parent | 79c2f647aab6c61d2c98b3a95bcafecbb87124fa (diff) | |
download | builder-fb77df17de8de4535638b747956622b5640f78f8.tar.xz |
bin/modify-package-state: binary packages are identified by version, thus we need to dig for the git revisions
-rwxr-xr-x | bin/modify-package-state | 24 |
1 files 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}" |