diff options
-rwxr-xr-x | bin/check-db-structure | 1 | ||||
-rwxr-xr-x | bin/get-assignment | 8 | ||||
-rwxr-xr-x | bin/return-assignment | 3 | ||||
-rwxr-xr-x | lib/mysql-functions | 28 |
4 files changed, 5 insertions, 35 deletions
diff --git a/bin/check-db-structure b/bin/check-db-structure index 8ecd692..afe01bd 100755 --- a/bin/check-db-structure +++ b/bin/check-db-structure @@ -48,6 +48,7 @@ mysqldump --skip-lock-tables 'buildmaster' \ 'repository_moves' \ 'repository_stabilities' \ 'repository_stability_relations' \ + 'toolchain_order' \ 'upstream_repositories' | \ grep '^INSERT ' | \ tr '\0\1' '01' | \ diff --git a/bin/get-assignment b/bin/get-assignment index df80e8b..f9913a4 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -159,8 +159,6 @@ fi next_building=$( # shellcheck disable=SC2016 { - mysql_query_create_toolchain_order - for suffix in '' '_copy'; do printf 'CREATE TEMPORARY TABLE `considered_build_assignments%s` (' \ "${suffix}" @@ -216,8 +214,8 @@ next_building=$( printf ' JOIN `build_assignments`' printf ' ON `build_assignments`.`id`=`considered_build_assignments_copy`.`id`' mysql_join_build_assignments_package_sources - printf ' JOIN `toolchain_order_copy`' - printf ' ON `toolchain_order_copy`.`pkgbase`=`package_sources`.`pkgbase`' + printf ' JOIN `toolchain_order`' + printf ' ON `toolchain_order`.`pkgbase`=`package_sources`.`pkgbase`' printf ');\n' # delete all currently building packages from considered list @@ -282,7 +280,7 @@ next_building=$( mysql_join_binary_packages_binary_packages_in_repositories 'block_bp' 'block_bpir' printf ' AND `block_bpir`.`repository`=%s' \ "${repository_ids__any_build_list}" - printf ' JOIN `toolchain_order_copy` AS `early`' + printf ' JOIN `toolchain_order` AS `early`' printf ' ON `early`.`pkgbase`=`block_ps`.`pkgbase`' printf ' WHERE `early`.`number`<`late`.`number`' printf ' AND `early`.`pkgbase`!=`late`.`pkgbase`' diff --git a/bin/return-assignment b/bin/return-assignment index fb4d6cb..db5d2e1 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -747,7 +747,6 @@ trigger_mirror_refreshs printf 'COMMIT;\n' # reschedule toolchain packages if they were not fully unblocked - mysql_query_create_toolchain_order printf 'INSERT IGNORE INTO `binary_packages` (' printf '`build_assignment`,' printf '`epoch`,' @@ -776,7 +775,7 @@ trigger_mirror_refreshs mysql_join_build_assignments_package_sources printf ' JOIN `toolchain_order` AS `late`' printf ' ON `late`.`pkgbase`=`package_sources`.`pkgbase`' - printf ' JOIN `toolchain_order_copy` AS `early`' + printf ' JOIN `toolchain_order` AS `early`' printf ' ON `early`.`number`<`late`.`number`' printf ' AND `early`.`pkgbase`!=`late`.`pkgbase`' printf ' JOIN `package_sources` AS `early_ps`' diff --git a/lib/mysql-functions b/lib/mysql-functions index 076c868..2e665dd 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -1121,34 +1121,6 @@ mysql_query_and_delete_unneeded_binary_packages() { printf ');\n' } -# mysql_query_create_toolchain_order -# write query, creating `toolchain_order` and `toolchain_order_copy` -# temporary tables -mysql_query_create_toolchain_order() { - # We force the following build order of the tool-chain: - # linux-api-headers->glibc->binutils->gcc->binutils->glibc - for suffix in '' '_copy'; do - printf 'CREATE TEMPORARY TABLE `toolchain_order%s` (' \ - "${suffix}" - printf '`number` SMALLINT,' - printf '`pkgbase` VARCHAR(64),' - printf 'PRIMARY KEY `number`(`number`)' - printf ');\n' - done - printf 'INSERT INTO `toolchain_order` (`number`,`pkgbase`) VALUES ' - printf '(%s,"%s"),' \ - 0 'linux-api-headers' \ - 1 'glibc' \ - 2 'binutils' \ - 3 'gcc' \ - 4 'binutils' \ - 5 'glibc' | \ - sed 's/,$/;\n/' - printf 'INSERT INTO `toolchain_order_copy` (`number`,`pkgbase`)' - printf ' SELECT `toolchain_order`.`number`,`toolchain_order`.`pkgbase`' - printf ' FROM `toolchain_order`;\n' -} - # mysql_update_versions_ordering # calculate the correct ordering of `versions` entries mysql_update_versions_ordering() { |