Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-07-19 09:39:03 +0200
committerErich Eckner <git@eckner.net>2019-07-19 09:39:03 +0200
commit410b16c77a441a99915d44d5fe5b3c4ba2e04517 (patch)
tree3da80c9685ea0fbe74a9f30caabe323c06a57002
parent6e7568345d145556a00ae2fd0b2d48558131a364 (diff)
bin/get-assignment: use mysql_join_toolchain_order_package_sources() and mysql_join_package_sources_toolchain_order() instead of hand-crafted joins
-rwxr-xr-xbin/get-assignment20
1 files changed, 8 insertions, 12 deletions
diff --git a/bin/get-assignment b/bin/get-assignment
index 53b2c8f..a66b5d4 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -274,8 +274,8 @@ next_building=$(
printf ' JOIN `build_assignments`'
printf ' ON `build_assignments`.`id`=`considered_build_assignments`.`id`'
mysql_join_build_assignments_package_sources
- printf ' JOIN `toolchain_order`'
- printf ' ON `toolchain_order`.`pkgbase`=`package_sources`.`pkgbase`;\n'
+ mysql_join_package_sources_toolchain_order
+ printf ';\n'
printf 'DELETE `considered_build_assignments`'
printf ' FROM `toolchain_architectures`'
@@ -284,8 +284,8 @@ next_building=$(
printf ' JOIN `considered_build_assignments`'
printf ' ON `build_assignments`.`id`=`considered_build_assignments`.`id`'
mysql_join_build_assignments_package_sources
- printf ' LEFT JOIN `toolchain_order`'
- printf ' ON `toolchain_order`.`pkgbase`=`package_sources`.`pkgbase`'
+ printf ' LEFT'
+ mysql_join_package_sources_toolchain_order
printf ' WHERE `toolchain_order`.`number` IS NULL;\n'
printf 'DELETE `considered_build_assignments_2`'
@@ -332,8 +332,7 @@ next_building=$(
printf ' JOIN `toolchain_order` AS `early`'
printf ' ON `late`.`pkgbase`!=`early`.`pkgbase`'
printf ' AND `late`.`number`>`early`.`number`'
- printf ' JOIN `package_sources` AS `e_ps`'
- printf ' ON `e_ps`.`pkgbase`=`early`.`pkgbase`'
+ mysql_join_toolchain_order_package_sources 'early' 'e_ps'
mysql_join_package_sources_build_assignments 'e_ps' 'e_ba'
printf ' JOIN `considered_build_assignments_3` AS `e_cba`'
printf ' ON `e_cba`.`id`=`e_ba`.`id`'
@@ -360,8 +359,7 @@ next_building=$(
printf ' WHERE NOT EXISTS ('
printf 'SELECT 1'
printf ' FROM `toolchain_order` AS `early`'
- printf ' JOIN `package_sources` AS `e_ps`'
- printf ' ON `e_ps`.`pkgbase`=`early`.`pkgbase`'
+ mysql_join_toolchain_order_package_sources 'early' 'e_ps'
mysql_join_package_sources_build_assignments 'e_ps' 'e_ba'
printf ' JOIN `considered_build_assignments_4` AS `e_cba`'
printf ' ON `e_ba`.`id`=`e_cba`.`id`'
@@ -486,8 +484,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` AS `early`'
- printf ' ON `early`.`pkgbase`=`block_ps`.`pkgbase`'
+ mysql_join_package_sources_toolchain_order 'block_ps' 'early'
printf ' WHERE `early`.`number`<`late`.`number`'
printf ' AND `early`.`pkgbase`!=`late`.`pkgbase`'
printf ' AND ('
@@ -503,8 +500,7 @@ next_building=$(
printf ')'
printf ') AS `is_blocked`'
printf ' FROM `toolchain_order` AS `late`'
- printf ' JOIN `package_sources`'
- printf ' ON `package_sources`.`pkgbase`=`late`.`pkgbase`'
+ mysql_join_toolchain_order_package_sources 'late'
mysql_join_package_sources_build_assignments
mysql_join_build_assignments_binary_packages
mysql_join_binary_packages_binary_packages_in_repositories