summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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 ')'
}