Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-06-17 11:51:29 +0200
committerErich Eckner <git@eckner.net>2020-06-17 11:51:29 +0200
commit7d0e135f0270eb6a05354e2927f4e198d9312078 (patch)
tree1755fb7d7789531b3c0e86d92cb003c358255d2e /bin
parentb4cb5a7b0021e08fd919d8b287074d3727540928 (diff)
bin/return-assignment: relax the avoid-prioritizing-loops-condition somewhat
Diffstat (limited to 'bin')
-rwxr-xr-xbin/return-assignment5
1 files changed, 1 insertions, 4 deletions
diff --git a/bin/return-assignment b/bin/return-assignment
index 9c141f0..3b511be 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -410,13 +410,10 @@ if [ "$6" = 'ERROR' ]; then
printf ' JOIN `binary_packages`'
printf ' ON `binary_packages`.`pkgname`=`broken`.`pkgname`'
mysql_join_binary_packages_build_assignments
-# TODO: We might want to relax the below condition somewhat. But we should
-# be careful to avoid prioritizing-loops.
- printf ' AND NOT `build_assignments`.`is_broken`'
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`=@`max_priority`+1;\n'
+ printf ' SET `build_assignments`.`priority`=GREATEST(0,@`max_priority`+IF(`build_assignments`.`is_broken`,-1,1));\n'
printf 'SELECT DISTINCT `broken`.`pkgname`'
printf ' FROM `broken`'