index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2023-06-17 21:46:56 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2023-06-17 21:46:56 +0200 |
commit | 5d1d1fb1ae445a073275925e943603f9a942f55d (patch) | |
tree | 95e4a6249b1827577b3e653f0ab5c2500ce046b0 | |
parent | 8c0b7a60382994b7f96c0996f23567b3646bed78 (diff) |
-rwxr-xr-x | bin/get-assignment | 24 |
diff --git a/bin/get-assignment b/bin/get-assignment index 25281e6..37b430f 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -201,16 +201,15 @@ while [ -s "${work_dir}/forced-package-builds.${slave}" ]; do fi done -# a package with [all dependencies met (or unsuccessfully built) or which is part of a loop] -# and which is currently not being built, ordered by: +# a package with [all dependencies met (or unsuccessfully built) or which is part of a loop], +# which is currently not being built and which has the highest priority, ordered by: # 1: we requested it # 2: tool chain priority -# 3: its priority -# 4: was built the least times -# 5: architecture matches (or the slave is from the majority architecture) -# 6: is part of a loop -# 7: has the oldes package source -# 8: build_assignment id +# 3: was built the least times +# 4: architecture matches (or the slave is from the majority architecture) +# 5: is part of a loop +# 6: has the oldes package source +# 7: build_assignment id next_building=$( # shellcheck disable=SC2016 { @@ -222,6 +221,11 @@ next_building=$( printf ');\n' done + printf 'SET @`max_priority`=(' + printf 'SELECT MAX(`build_assignments`.`priority`)' + printf ' FROM `build_assignments`' + printf ');\n' + printf 'INSERT IGNORE INTO `considered_build_assignments` (`id`)' printf ' SELECT `build_assignments`.`id`' printf ' FROM `build_assignments`' @@ -243,7 +247,8 @@ next_building=$( printf ')' printf ' LEFT' mysql_join_package_sources_toolchain_order - printf ' WHERE (' + printf ' WHERE `build_assignments`.`priority`=@`max_priority`' + printf ' AND (' printf '`build_assignments`.`is_blocked` IS NULL' if [ -n "${requested}" ]; then printf ' OR' @@ -540,7 +545,6 @@ next_building=$( # 1: in toolchain, should be built later # 2: not in toolchain printf 'IFNULL(`toolchain_query`.`priority`,2),' - printf '`build_assignments`.`priority` DESC,' printf 'IFNULL(`latest_failed_builds`.`count`,0),' printf 'IF(' printf '`architectures`.`id`=%s' \ |