From f98072f6d086d128071047d4a4ad5db560686c12 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 7 Nov 2017 09:54:13 +0100 Subject: check-bugtracker new: remove "tested" flag from faulty packages --- bin/modify-package-state | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'bin/modify-package-state') diff --git a/bin/modify-package-state b/bin/modify-package-state index 2640aa2..6ccec6a 100755 --- a/bin/modify-package-state +++ b/bin/modify-package-state @@ -11,6 +11,7 @@ usage() { >&2 echo '' >&2 echo 'possible options:' >&2 echo ' -b|--block: Block package(s).' + >&2 echo ' -f|--faulty: Mark testing/tested package(s) as faulty.' >&2 echo ' -h|--help: Show this help and exit.' >&2 echo ' -n|--no-report: Do not report what packages were modified.' >&2 echo ' -t|--tested: Mark package(s) as tested.' @@ -21,8 +22,9 @@ usage() { } eval set -- "$( - getopt -o bhntu \ + getopt -o bfhntu \ --long block \ + --long faulty \ --long help \ --long no-report \ --long tested \ @@ -44,6 +46,13 @@ do fi action='block' ;; + -f|--faulty) + if [ -n "${action}" ]; then + >&2 echo 'Conflicting/redundand arguments.' + usage + fi + action='faulty' + ;; -h|--help) usage 0 ;; @@ -77,7 +86,7 @@ do done if [ -z "${action}" ]; then - >&2 echo 'Expected -b|-t|-u.' + >&2 echo 'Expected -b|-f|-t|-u.' usage fi @@ -167,12 +176,21 @@ fi printf '%s %s\n' "${package}" "${reason}" fi ;; + 'faulty') + if [ -f "${work_dir}/package-states/${package}.tested" ]; then + mv \ + "${work_dir}/package-states/${package}.tested" \ + "${work_dir}/package-states/${package}.testing" + printf '%s\n' "${package}" + fi + ;; 'tested') if [ -f "${work_dir}/package-states/${package}.testing" ] && \ ! package_has_bug "${package}" < "${tmp_dir}/package-bug-titles"; then mv \ "${work_dir}/package-states/${package}.testing" \ "${work_dir}/package-states/${package}.tested" + printf '%s\n' "${package}" fi ;; 'unblock') -- cgit v1.2.3-70-g09d2