summaryrefslogtreecommitdiff
path: root/bin/db-update
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-25 13:40:36 +0200
committerErich Eckner <git@eckner.net>2018-05-25 13:40:36 +0200
commit8aeca7194277ab52126bb3358635743be2ed7e2d (patch)
tree9ddf06fcf276eeb6f563def98985826aaeb4ff14 /bin/db-update
parent64277df1805bb165184267cab3668166da780b1e (diff)
downloadbuilder-8aeca7194277ab52126bb3358635743be2ed7e2d.tar.xz
lib/mysql-functions: make mysql_join_binary_packages_repositories and mysql_join_repositories_binary_packages obsolete
Diffstat (limited to 'bin/db-update')
-rwxr-xr-xbin/db-update18
1 files changed, 12 insertions, 6 deletions
diff --git a/bin/db-update b/bin/db-update
index 33a1436..f817833 100755
--- a/bin/db-update
+++ b/bin/db-update
@@ -149,7 +149,8 @@ for source_stability in 'testing' 'staging'; do
sed 's/,$/;\n/'
printf 'DELETE `moveable_binary_packages` FROM `moveable_binary_packages`'
printf ' JOIN `binary_packages` ON `binary_packages`.`id`=`moveable_binary_packages`.`id`'
- mysql_join_binary_packages_repositories
+ mysql_join_binary_packages_binary_packages_in_repositories
+ mysql_join_binary_packages_in_repositories_repositories
mysql_join_repositories_repository_stabilities
printf ' WHERE `repository_stabilities`.`name`!="%s";\n' \
"${source_stability}"
@@ -177,7 +178,8 @@ for source_stability in 'testing' 'staging'; do
printf 'INSERT IGNORE INTO `replaced_binary_packages` (`id`,`replaced_by`)'
printf ' SELECT `binary_packages`.`id`,`subst_bp`.`id`'
printf ' FROM `binary_packages`'
- mysql_join_binary_packages_repositories
+ mysql_join_binary_packages_binary_packages_in_repositories
+ mysql_join_binary_packages_in_repositories_repositories
printf ' AND `repositories`.`is_on_master_mirror`'
mysql_join_binary_packages_build_assignments
mysql_join_build_assignments_package_sources
@@ -187,7 +189,8 @@ for source_stability in 'testing' 'staging'; do
printf ' JOIN `binary_packages` AS `subst_bp`'
printf ' ON `binary_packages`.`pkgname`=`subst_bp`.`pkgname`'
printf ' AND `repository_moves`.`from_repository`=`subst_bp`.`repository`'
- mysql_join_binary_packages_repositories 'subst_bp' 'subst_r'
+ mysql_join_binary_packages_binary_packages_in_repositories 'subst_bp' 'subst_bpir'
+ mysql_join_binary_packages_in_repositories_repositories 'subst_bpir' 'subst_r'
mysql_join_repositories_repository_stabilities 'subst_r' 'subst_rs'
printf ' AND `subst_rs`.`name`="%s"' \
"${source_stability}"
@@ -208,7 +211,8 @@ for source_stability in 'testing' 'staging'; do
printf 'INSERT IGNORE INTO `moveable_binary_packages` (`id`,`to_repository`)'
printf ' SELECT `binary_packages`.`id`,`repository_moves`.`to_repository`'
printf ' FROM `binary_packages`'
- mysql_join_binary_packages_repositories
+ mysql_join_binary_packages_binary_packages_in_repositories
+ mysql_join_binary_packages_in_repositories_repositories
printf ' AND `repositories`.`is_on_master_mirror`'
mysql_join_repositories_repository_stabilities
printf ' AND `repository_stabilities`.`name`="%s"' \
@@ -253,7 +257,8 @@ for source_stability in 'testing' 'staging'; do
printf ',`repositories`.`name`,`new_repo`.`name`'
printf ' FROM `moveable_binary_packages`'
printf ' JOIN `binary_packages` ON `moveable_binary_packages`.`id`=`binary_packages`.`id`'
- mysql_join_binary_packages_repositories
+ mysql_join_binary_packages_binary_packages_in_repositories
+ mysql_join_binary_packages_in_repositories_repositories
mysql_join_binary_packages_architectures
printf ' JOIN `repositories` AS `new_repo` ON `new_repo`.`id`=`moveable_binary_packages`.`to_repository`'
printf ';\n'
@@ -266,7 +271,8 @@ for source_stability in 'testing' 'staging'; do
printf ',`repositories`.`name`'
printf ' FROM `replaced_binary_packages`'
printf ' JOIN `binary_packages` ON `replaced_binary_packages`.`id`=`binary_packages`.`id`'
- mysql_join_binary_packages_repositories
+ mysql_join_binary_packages_binary_packages_in_repositories
+ mysql_join_binary_packages_in_repositories_repositories
mysql_join_binary_packages_architectures
printf ';\n'
} | \