Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/bootstrap-mysql13
1 files changed, 10 insertions, 3 deletions
diff --git a/bin/bootstrap-mysql b/bin/bootstrap-mysql
index 344c5a0..a142715 100755
--- a/bin/bootstrap-mysql
+++ b/bin/bootstrap-mysql
@@ -37,7 +37,10 @@ fi
printf 'DELIMITER //\n'
printf 'DROP PROCEDURE IF EXISTS `calculate_maximal_moveable_set`//\n'
- printf 'CREATE PROCEDURE `calculate_maximal_moveable_set`(IN `from_stability` MEDIUMINT)\n'
+ printf 'CREATE PROCEDURE `calculate_maximal_moveable_set`('
+ printf 'IN `arch_id` MEDIUMINT,'
+ printf 'IN `from_stability` MEDIUMINT'
+ printf ')\n'
printf 'BEGIN\n'
# variable to store count of changed rows
printf 'DECLARE row_count_saved INT DEFAULT 0;\n'
@@ -74,7 +77,9 @@ fi
mysql_join_binary_packages_binary_packages_in_repositories 'b_bp' 'b_bpir'
mysql_join_binary_packages_in_repositories_repositories 'b_bpir' 'b_r'
printf ' WHERE `a_r`.`stability` = `from_stability`'
- printf ' AND `b_r`.`stability` = `from_stability`;\n'
+ printf ' AND `a_r`.`architecture` = `arch_id`'
+ printf ' AND `b_r`.`stability` = `from_stability`'
+ printf ' AND `b_r`.`architecture` = `arch_id`;\n'
# these packages are considered for moving:
printf 'INSERT IGNORE INTO `moveable_bpir` (`id`,`to_repository`)'
printf ' SELECT `binary_packages_in_repositories`.`id`,`repository_moves`.`to_repository`'
@@ -89,6 +94,7 @@ fi
printf ' AND `repository_moves`.`from_repository`=`binary_packages_in_repositories`.`repository`'
# correct stability: "testing"/"staging" - as chosen
printf ' WHERE `repository_stabilities`.`id`=`from_stability`'
+ printf ' AND `repositories`.`architecture`=`arch_id`'
printf ' AND ('
# this should not be replaced by ${repository_stability_ids__staging},
# because it may change
@@ -108,7 +114,8 @@ fi
mysql_join_build_assignments_binary_packages
mysql_join_binary_packages_binary_packages_in_repositories
mysql_join_binary_packages_in_repositories_repositories
- printf ' WHERE `repositories`.`stability`=`from_stability`;\n'
+ printf ' WHERE `repositories`.`stability`=`from_stability`'
+ printf ' AND `repositories`.`architecture`=`arch_id`;\n'
# these packages are considered for being replaced:
# for each moved package