Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/delete-packages
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/delete-packages
parent64277df1805bb165184267cab3668166da780b1e (diff)
lib/mysql-functions: make mysql_join_binary_packages_repositories and mysql_join_repositories_binary_packages obsolete
Diffstat (limited to 'bin/delete-packages')
-rwxr-xr-xbin/delete-packages21
1 files changed, 14 insertions, 7 deletions
diff --git a/bin/delete-packages b/bin/delete-packages
index 116b12d..df51593 100755
--- a/bin/delete-packages
+++ b/bin/delete-packages
@@ -107,7 +107,8 @@ export TMPDIR="${tmp_dir}"
printf 'INSERT IGNORE INTO `to_deletes`'
printf ' SELECT DISTINCT `binary_packages`.`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 ' LEFT' # should not be necessary, but is formally more correct
mysql_join_binary_packages_install_target_providers
printf ' WHERE `binary_packages`.`is_to_be_deleted`'
@@ -120,7 +121,8 @@ export TMPDIR="${tmp_dir}"
mysql_join_dependencies_binary_packages '' 'd_bp'
# deliberately break dependencies of deletion-list packages
printf ' AND NOT `d_bp`.`is_to_be_deleted`'
- mysql_join_binary_packages_repositories 'd_bp' 'd_r'
+ mysql_join_binary_packages_binary_packages_in_repositories 'd_bp' 'd_bpir'
+ mysql_join_binary_packages_in_repositories_repositories 'd_bpir' 'd_r'
mysql_join_repositories_repository_stabilities 'd_r' 'd_rs'
# this is deliberately less restrict than `d_r`.`is_on_master_mirror`
printf ' AND `d_rs`.`name` NOT IN ("forbidden","virtual")'
@@ -129,7 +131,8 @@ export TMPDIR="${tmp_dir}"
printf 'SELECT 1 FROM `binary_packages` AS `s_bp`'
mysql_join_binary_packages_install_target_providers 's_bp' 's_itp'
printf ' AND NOT `s_bp`.`is_to_be_deleted`'
- mysql_join_binary_packages_repositories 's_bp' 's_r'
+ mysql_join_binary_packages_binary_packages_in_repositories 's_bp' 's_bpir'
+ mysql_join_binary_packages_in_repositories_repositories 's_bpir' 's_r'
printf ' AND `s_r`.`is_on_master_mirror`'
printf ' JOIN `repository_stability_relations`'
printf ' ON `repository_stability_relations`.`more_stable`=`s_r`.`stability`'
@@ -141,20 +144,23 @@ export TMPDIR="${tmp_dir}"
printf 'SELECT DISTINCT "repo",`repositories`.`name`'
printf ' FROM `to_deletes`'
printf ' JOIN `binary_packages` ON `to_deletes`.`id`=`binary_packages`.`id`'
- mysql_join_binary_packages_repositories
+ mysql_join_binary_packages_binary_packages_in_repositories
+ mysql_join_binary_packages_in_repositories_repositories
printf ';\n'
printf 'SELECT "package",`repositories`.`name`,`binary_packages`.`pkgname`'
printf ' FROM `to_deletes`'
printf ' JOIN `binary_packages` ON `to_deletes`.`id`=`binary_packages`.`id`'
- mysql_join_binary_packages_repositories
+ mysql_join_binary_packages_binary_packages_in_repositories
+ mysql_join_binary_packages_in_repositories_repositories
printf ';\n'
printf 'SELECT "package-file",`repositories`.`name`,'
mysql_package_name_query
printf ' FROM `to_deletes`'
printf ' JOIN `binary_packages` ON `to_deletes`.`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'
@@ -254,7 +260,8 @@ fi
printf 'UPDATE `binary_packages` '
printf ' JOIN `to_deletes` ON `to_deletes`.`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 ' SET `repository`=('
printf 'SELECT `repositories`.`id`'