From e0c167a65916bf995add39aec94f5f524af834e4 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 1 Jun 2018 11:06:41 +0200 Subject: make `binary_packages`.`is_to_be_deleted` and `binary_packages`.`last_moved` obsolete; cleanup some queries --- bin/delete-packages | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bin/delete-packages') diff --git a/bin/delete-packages b/bin/delete-packages index 8ec7730..75fdc8e 100755 --- a/bin/delete-packages +++ b/bin/delete-packages @@ -113,7 +113,7 @@ export TMPDIR="${tmp_dir}" 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`' + printf ' WHERE `binary_packages_in_repositories`.`is_to_be_deleted`' printf ' AND `repositories`.`is_on_master_mirror`' printf ' AND NOT EXISTS (' # no packages depending on that one exist @@ -121,9 +121,9 @@ export TMPDIR="${tmp_dir}" mysql_join_dependencies_dependency_types printf ' AND `dependency_types`.`relevant_for_binary_packages`' 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_binary_packages_in_repositories 'd_bp' 'd_bpir' + # deliberately break dependencies of deletion-list packages + printf ' AND NOT `d_bpir`.`is_to_be_deleted`' 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` @@ -131,9 +131,9 @@ export TMPDIR="${tmp_dir}" printf ' WHERE `install_target_providers`.`install_target`=`dependencies`.`depending_on`' printf ' AND NOT EXISTS (' 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_binary_packages_in_repositories 's_bp' 's_bpir' + printf ' AND NOT `s_bpir`.`is_to_be_deleted`' + mysql_join_binary_packages_install_target_providers 's_bp' 's_itp' mysql_join_binary_packages_in_repositories_repositories 's_bpir' 's_r' printf ' AND `s_r`.`is_on_master_mirror`' printf ' JOIN `repository_stability_relations`' -- cgit v1.2.3-70-g09d2