Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/return-assignment18
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/return-assignment b/bin/return-assignment
index 7b8507e..017b9e9 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -321,6 +321,24 @@ if [ "$6" = 'ERROR' ]; then
fi
)
+ # prioritize _this_ build assignment iff we rescheduled any broken dependencies
+ if [ -n "${rescheduled_packages}" ]; then
+ # shellcheck disable=SC2016
+ {
+ printf 'UPDATE `build_assignments`'
+ printf ' SET `build_assignments`.`priority`=('
+ printf 'SELECT MAX(`build_assignments`.`priority`)'
+ printf ' FROM `build_assignments`'
+ printf ')+1'
+ printf ' WHERE `build_assignments`.`id`=from_base64("%s");\n' \
+ "$(
+ printf '%s' "${build_assignment_id}" | \
+ base64 -w0
+ )"
+ } | \
+ mysql_run_query
+ fi
+
# shellcheck disable=SC2119
{
printf '%s/%s ' \