Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/get-assignment8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/get-assignment b/bin/get-assignment
index 3a24c76..462d2c7 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -204,7 +204,7 @@ done
# 2: tool chain priority
# 3: its priority
# 4: was built the least times
-# 5: architecture matches
+# 5: architecture matches (or the slave is from the majority architecture)
# 6: is part of a loop
# 7: has the oldes package source
# 8: build_assignment id
@@ -480,7 +480,11 @@ next_building=$(
printf 'IFNULL(`toolchain_query`.`priority`,2),'
printf '`build_assignments`.`priority` DESC,'
printf 'IFNULL(`latest_failed_builds`.`count`,0),'
- printf 'IF(`architectures`.`id`=`build_assignments`.`architecture`,1,0) DESC,'
+ printf 'IF('
+ printf '`architectures`.`id`=%s' \
+ "$(mysql_determine_majority_build_slave_architecture_id)"
+ printf ' OR `architectures`.`id`=`build_assignments`.`architecture`,'
+ printf '1,0) DESC,'
printf 'IF('
mysql_query_is_part_of_loop '`build_assignments`.`id`'
printf ',1,0),'