summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/interpret-mail19
-rwxr-xr-xbin/seed-build-list10
-rwxr-xr-xconf/default.conf2
3 files changed, 28 insertions, 3 deletions
diff --git a/bin/interpret-mail b/bin/interpret-mail
index f2b7d26..0401498 100755
--- a/bin/interpret-mail
+++ b/bin/interpret-mail
@@ -29,6 +29,9 @@ if [ $# -ne 0 ]; then
>&2 echo ' - "unblock: <state-file>":'
>&2 echo ' Unblock the given packge.'
>&2 echo ''
+ >&2 echo ' - "schedule: <pkgname>":'
+ >&2 echo ' Put the given package on the build list (again).'
+ >&2 echo ''
>&2 echo ' - ALL: all of the above (only valid in'
>&2 echo ' "conf/admin-gpg-keys")'
>&2 echo ''
@@ -215,3 +218,19 @@ if [ -s "${tmp_dir}/unblock" ]; then
log 'There was an error while unblocking the packages - ignoring this message.\n'
fi
fi
+
+if [ -s "${tmp_dir}/schedule" ]; then
+ # shellcheck disable=SC2046
+ "${base_dir}/bin/seed-build-list" $(
+ tr '[:space:]' '\n' < \
+ "${tmp_dir}/schedule" | \
+ grep -vxF '' | \
+ while read -r package; do
+ printf -- '-p ^%s$\n' "$(str_to_regex "${package}")"
+ done
+ ) | \
+ sponge "${tmp_dir}/schedule"
+ if [ -s "${tmp_dir}/schedule" ]; then
+ log 'Successfully (re)scheduled %s packages.\n' "$(wc -l < "${tmp_dir}/schedule")"
+ fi
+fi
diff --git a/bin/seed-build-list b/bin/seed-build-list
index 5392306..cfe4bab 100755
--- a/bin/seed-build-list
+++ b/bin/seed-build-list
@@ -89,6 +89,12 @@ if [ $# -ne 0 ]; then
usage 1
fi
+if [ ! -s "${tmp_dir}/mirrors" ] && \
+ [ ! -s "${tmp_dir}/package-regexes" ]; then
+ # nothing to do
+ exit 0
+fi
+
repos="${stable_package_repositories}"
find "${work_dir}/package-infos" -maxdepth 1 -name '*.packages' -printf '%f\n' | \
@@ -273,8 +279,8 @@ fi
if ${update}; then
awk '{print $4 " " $1 " " $2 " " $3}' \
- "${tmp_dir}/build-list.new" >> \
- "${work_dir}/build-list"
+ "${tmp_dir}/build-list.new" | \
+ tee -a "${work_dir}/build-list"
# Remove the lock file
diff --git a/conf/default.conf b/conf/default.conf
index 68efd5f..de14704 100755
--- a/conf/default.conf
+++ b/conf/default.conf
@@ -33,7 +33,7 @@ repo_key='0xdeadbeef'
package_key='0x15eebadc0de'
# what can be done via the email interface
-possible_email_actions='stabilize block unblock'
+possible_email_actions='stabilize block unblock schedule'
# how many lines of email logs should be kept maximally
max_mail_log_lines=10