From c4fdc76628467cb9b570d3569042b4fa7c9ab1cc Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 10 Jul 2020 20:26:30 +0200 Subject: bin/return-assignment: do not decrease priority when trying to increase priority of reschedules --- bin/return-assignment | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin/return-assignment') 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`' -- cgit v1.2.3-70-g09d2