summaryrefslogtreecommitdiff
path: root/bin/modify-package-state
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-11-07 09:54:13 +0100
committerErich Eckner <git@eckner.net>2017-11-07 09:54:13 +0100
commitf98072f6d086d128071047d4a4ad5db560686c12 (patch)
treeea3a735fef4f9e2d6ddeb9b8bb858ee4336e7ada /bin/modify-package-state
parent4fad91a1af6707aaf1dad619ac4e648b45404c2b (diff)
downloadbuilder-f98072f6d086d128071047d4a4ad5db560686c12.tar.xz
check-bugtracker new: remove "tested" flag from faulty packages
Diffstat (limited to 'bin/modify-package-state')
-rwxr-xr-xbin/modify-package-state22
1 files changed, 20 insertions, 2 deletions
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')