summaryrefslogtreecommitdiff
path: root/bin/interpret-mail
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-06-11 10:37:07 +0200
committerErich Eckner <git@eckner.net>2018-06-11 10:37:07 +0200
commitec1bac6428c274401c4d54e916024a0ace3cce17 (patch)
tree1903035b711018fb65ae807ee49260b2f35c9243 /bin/interpret-mail
parentde9728267ea993ead851e4ed1cb69b7474daf0df (diff)
downloadbuilder-ec1bac6428c274401c4d54e916024a0ace3cce17.tar.xz
bin/interpret-mail can now prioritize build assignments
Diffstat (limited to 'bin/interpret-mail')
-rwxr-xr-xbin/interpret-mail17
1 files changed, 13 insertions, 4 deletions
diff --git a/bin/interpret-mail b/bin/interpret-mail
index 4a290d8..4890e4c 100755
--- a/bin/interpret-mail
+++ b/bin/interpret-mail
@@ -7,8 +7,6 @@
# TODO: enable email interface to delete packages
-# TODO: enable email interface to prioritize packages
-
# shellcheck disable=SC2016
if [ $# -ne 0 ]; then
>&2 echo ''
@@ -24,11 +22,14 @@ if [ $# -ne 0 ]; then
>&2 echo ' Possible instructions are:'
>&2 echo ''
>&2 echo ' - "block: <state-file> <reason>":'
- >&2 echo ' Block the given packge for the given reason.'
+ >&2 echo ' Block the given build assignment for the given reason.'
>&2 echo ''
>&2 echo ' - "copy-to-build-support: <arch> <pkgname>":'
>&2 echo ' Copy the given binary package into [build-support].'
>&2 echo ''
+ >&2 echo ' - "prioritize: <pkgbase-regex>":'
+ >&2 echo ' Increase the priority of matching build assignments.'
+ >&2 echo ''
>&2 echo ' - "schedule: <pkgbase>":'
>&2 echo ' Put the given package on the build list (again).'
>&2 echo ''
@@ -36,7 +37,7 @@ if [ $# -ne 0 ]; then
>&2 echo ' Mark the given package as tested.'
>&2 echo ''
>&2 echo ' - "unblock: <state-file>":'
- >&2 echo ' Unblock the given packge.'
+ >&2 echo ' Unblock the given build assignment.'
>&2 echo ''
exit 1
fi
@@ -274,6 +275,14 @@ if [ -s "${tmp_dir}/copy-to-build-support" ]; then
fi
fi
+if [ -s "${tmp_dir}/prioritize" ]; then
+ if run_and_log_on_error 'prioritize' "${base_dir}/bin/prioritize-build-list" --wait "${tmp_dir}/prioritize"; then
+ log 1 'prioritize' "$(cat "${tmp_dir}/prioritize")"
+ else
+ log 0 'prioritize' 0
+ fi
+fi
+
if [ -s "${tmp_dir}/schedule" ]; then
# shellcheck disable=SC2046
"${base_dir}/bin/seed-build-list" --wait $(