From 2782ca1872ca1276df85f5a039418d1f472e103a Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 13 Feb 2018 14:17:10 +0100 Subject: bin/return-assignment: only move packages from the build-list which are on the build-list --- bin/return-assignment | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/return-assignment b/bin/return-assignment index a1f3020..7d8a609 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -481,21 +481,23 @@ fi printf 'UPDATE `build_assignments`' printf ' JOIN `build_slaves` ON `build_slaves`.`currently_building`=`build_assignments`.`id`' printf ' JOIN `binary_packages` ON `binary_packages`.`build_assignment`=`build_assignments`.`id`' + printf ' JOIN `repositories` AS `old_repo` ON `binary_packages`.`repository`=`old_repo`.`id`' printf ' SET' printf ' `build_assignments`.`is_broken`=0,' printf ' `build_assignments`.`priority`=0,' - printf ' `binary_packages`.`repository`=(SELECT `repositories`.`id` FROM `repositories` WHERE `repositories`.`name`=from_base64("%s")),' \ + printf ' `binary_packages`.`repository`=(SELECT `new_repo`.`id` FROM `repositories` AS `new_repo` WHERE `new_repo`.`name`=from_base64("%s")),' \ "$( printf '%s' "${destination}" | \ base64 -w0 )" printf ' `binary_packages`.`has_issues`=0,' printf ' `binary_packages`.`is_tested`=0' - printf ' WHERE `build_slaves`.`name`=from_base64("%s");\n' \ + printf ' WHERE `build_slaves`.`name`=from_base64("%s")' \ "$( printf '%s' "${slave}" | \ base64 -w0 )" + printf ' AND `old_repo`.`name`="build-list";\n' printf 'UPDATE `build_slaves` AS `to_update`' printf ' JOIN `build_slaves` AS `current_slave`' printf ' ON `to_update`.`currently_building`=`current_slave`.`currently_building`' -- cgit v1.2.3-70-g09d2