From b408d8fb7c4692be53590175ce5eb05f4e12a362 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 14 Apr 2019 19:35:42 +0200 Subject: bin/get-assignment: hand out /any/ compatible architecture --- bin/get-assignment | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'bin/get-assignment') diff --git a/bin/get-assignment b/bin/get-assignment index abb4c96..5749f23 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -131,6 +131,7 @@ currently_building=$( printf ' ON `architecture_compatibilities`.`built_for`=`build_assignments`.`architecture`' printf ' JOIN `architectures`' printf ' ON `architecture_compatibilities`.`runs_on`=`architectures`.`id`' + printf ' AND `architecture_compatibilities`.`build_slave_compatible`' printf ' WHERE `build_slaves`.`id`=from_base64("%s")' \ "$(printf '%s' "${slave_id}" | base64 -w0)" printf ' AND `binary_packages_in_repositories`.`repository`=%s' \ @@ -218,7 +219,7 @@ next_building=$( mysql_join_binary_packages_binary_packages_in_repositories printf ' JOIN `architecture_compatibilities`' printf ' ON `architecture_compatibilities`.`built_for`=`build_assignments`.`architecture`' - printf ' AND `architecture_compatibilities`.`fully_compatible`' + printf ' AND `architecture_compatibilities`.`build_slave_compatible`' printf ' JOIN `architectures`' printf ' ON `architecture_compatibilities`.`runs_on`=`architectures`.`id`' printf ' LEFT' @@ -319,8 +320,11 @@ next_building=$( printf ' FROM `binary_packages_in_repositories`' mysql_join_binary_packages_in_repositories_repositories printf ' AND `repositories`.`is_on_master_mirror`' - mysql_join_repositories_architectures -# TODO: this seems wrong - an "any" package will never match here! + printf ' JOIN `architecture_compatibilities`' + printf ' ON `repositories`.`architecture`=`architecture_compatibilities`.`runs_on`' + printf ' AND `architecture_compatibilities`.`build_slave_compatible`' + printf ' JOIN `architectures`' + printf ' ON `architectures`.`id`=`architecture_compatibilities`.`built_for`' printf ' AND `architectures`.`name`=from_base64("%s")' \ "${arch}" mysql_join_binary_packages_in_repositories_binary_packages -- cgit v1.2.3-70-g09d2