index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2023-06-18 21:57:50 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2023-06-18 21:57:50 +0200 |
commit | fe75af7a3ff04e0327aa0425f9f6d6cae0925b1b (patch) | |
tree | 5d4d6ab67171a11b9d1b4de97b8faf6815fdcd88 | |
parent | d233eea6d04773c2ab3d86dc84f22bdf359110be (diff) |
-rwxr-xr-x | bin/get-assignment | 23 |
diff --git a/bin/get-assignment b/bin/get-assignment index 37b430f..8b399a3 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -221,11 +221,6 @@ 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`' @@ -247,8 +242,7 @@ next_building=$( printf ')' printf ' LEFT' mysql_join_package_sources_toolchain_order - printf ' WHERE `build_assignments`.`priority`=@`max_priority`' - printf ' AND (' + printf ' WHERE (' printf '`build_assignments`.`is_blocked` IS NULL' if [ -n "${requested}" ]; then printf ' OR' @@ -266,6 +260,21 @@ next_building=$( printf ' AND `architectures`.`name` = from_base64("%s");\n' \ "${arch}" + printf 'SET @`max_priority`=(' + printf 'SELECT MAX(`build_assignments`.`priority`)' + printf ' FROM `considered_build_assignments`' + printf ' JOIN `build_assignments`' + printf ' ON `build_assignments`.`id`=`considered_build_assignments`.`id`' + printf ');\n' + + printf 'DELETE `considered_build_assignments`' + printf ' FROM `considered_build_assignments`' + printf ' JOIN `build_assignments`' + printf ' ON `build_assignments`.`id`=`considered_build_assignments`.`id`' + printf ' WHERE `build_assignments`.`priority`<@`max_priority`' + printf ';\n' + + printf 'INSERT IGNORE INTO `considered_build_assignments_2` (`id`)' printf ' SELECT `considered_build_assignments`.`id`' printf ' FROM `considered_build_assignments`;\n' |