Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/mysql-functions
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-09-12 11:09:07 +0200
committerErich Eckner <git@eckner.net>2018-09-12 11:09:07 +0200
commit9b9b8eb72586ce7d5890b78c9fd67b1da3acb474 (patch)
tree0e7c297c759100ccad2c7701be2ff5b1fbb8d4c7 /lib/mysql-functions
parentc67ca190d30757758928cd9c06a1a7a710a6d694 (diff)
bin/get-assignment,lib/mysql-functions: mysql_query_has_pending_dependencies() now only looks for a single architecture
Diffstat (limited to 'lib/mysql-functions')
-rwxr-xr-xlib/mysql-functions11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 13a751e..972f227 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -824,16 +824,20 @@ mysql_cleanup() {
mysql_run_query 'unimportant'
}
-# mysql_query_has_pending_dependencies `build_assignment`.`id`
+# mysql_query_has_pending_dependencies builder-architecture `build_assignment`.`id`
# print a mysql query giving whether dependencies are pending
mysql_query_has_pending_dependencies() {
printf 'EXISTS ('
printf 'SELECT 1 FROM `binary_packages_in_repositories` as `todos_bpir`'
mysql_join_binary_packages_in_repositories_binary_packages 'todos_bpir' 'todos'
+ printf ' JOIN `architecture_compatibilities` AS `todo_ac`'
+ printf ' ON `todos`.`architecture`=`todo_ac`.`runs_on`'
mysql_join_binary_packages_dependencies 'todos' 'l_deps'
mysql_join_dependencies_dependency_types 'l_deps' 'l_dep_ts'
mysql_join_dependencies_install_target_providers_with_versions 'l_deps' 'l_itps'
mysql_join_install_target_providers_binary_packages 'l_itps' 'deps'
+ printf ' JOIN `architecture_compatibilities` AS `dep_ac`'
+ printf ' ON `deps`.`architecture`=`dep_ac`.`runs_on`'
mysql_join_binary_packages_binary_packages_in_repositories 'deps' 'deps_bpir'
printf ' WHERE'
printf ' `%s`.`repository`=%s AND' \
@@ -842,7 +846,10 @@ mysql_query_has_pending_dependencies() {
printf ' `l_dep_ts`.`relevant_for_building` AND '
printf ' `deps`.`build_assignment`!=`todos`.`build_assignment` AND'
printf ' `todos`.`build_assignment`=%s' \
- "$1"
+ "$2"
+ printf ' AND `%s`.`runs_on`=%s' \
+ 'todo_ac' "$1" \
+ 'dep_ac' "$1"
printf ')'
}