From 7f1100ee43c2628277d4affd51d604a816835958 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 25 May 2018 19:20:12 +0200 Subject: lib/common-functions: remove_old_package_versions(): remove binary_packages_in_repositories, too --- lib/common-functions | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/common-functions b/lib/common-functions index 50dc6f1..7fe91ef 100755 --- a/lib/common-functions +++ b/lib/common-functions @@ -126,8 +126,6 @@ ls_master_mirror() { remove_old_package_versions() { -# TODO: needs to remove binary_packages_in_repositories, too - ( # the new shell is intentional tmp_dir=$(mktemp -d 'tmp.common-functions.remove_old_package_versions.XXXXXXXXXX' --tmpdir) trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT @@ -230,6 +228,7 @@ remove_old_package_versions() { printf 'CREATE TEMPORARY TABLE `del` (`id` BIGINT NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`));\n' printf 'LOAD DATA LOCAL INFILE "%s" INTO TABLE `del` (`id`);\n' "${tmp_dir}/db-removes" printf 'DELETE `binary_packages` FROM `binary_packages` JOIN `del` ON `binary_packages`.`id`=`del`.`id`;\n' + printf 'DELETE `binary_packages_in_repositories` FROM `binary_packages_in_repositories` JOIN `del` ON `binary_packages_in_repositories`.`package`=`del`.`id`;\n' } | \ mysql_run_query fi -- cgit v1.2.3-70-g09d2