Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-07-10 20:26:30 +0200
committerErich Eckner <git@eckner.net>2020-10-19 19:24:53 +0200
commitc4fdc76628467cb9b570d3569042b4fa7c9ab1cc (patch)
tree2859f6323e0a8aad0cda39bb421c7988842f8504
parentab7951cb4d26a1ae1099b2c385b06cf8b6cd3e83 (diff)
bin/return-assignment: do not decrease priority when trying to increase priority of reschedules
-rwxr-xr-xbin/return-assignment5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/return-assignment b/bin/return-assignment
index 40733c1..6b64bf4 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -420,7 +420,10 @@ if [ "$6" = 'ERROR' ]; then
mysql_join_binary_packages_binary_packages_in_repositories
printf ' AND `binary_packages_in_repositories`.`repository`=%s' \
"${repository_ids__any_build_list}"
- printf ' SET `build_assignments`.`priority`=GREATEST(0,@`max_priority`+IF(`build_assignments`.`is_broken`,-1,1));\n'
+ printf ' SET `build_assignments`.`priority`=GREATEST('
+ printf '`build_assignments`.`priority`,'
+ printf '@`max_priority`+IF(`build_assignments`.`is_broken`,-1,1)'
+ printf ');\n'
printf 'SELECT DISTINCT `broken`.`pkgname`'
printf ' FROM `broken`'