summaryrefslogtreecommitdiff
path: root/lib/common-functions
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-06-04 12:00:30 +0200
committerErich Eckner <git@eckner.net>2018-06-04 12:00:30 +0200
commitc43c80543417c803000bcca55ad1c93b6f212e11 (patch)
tree2efedd7e80058d6fe15b8ce366e37526d2973afb /lib/common-functions
parentfaa9172fa760425f05cce8b5d346f944bfc5b5fd (diff)
downloadbuilder-c43c80543417c803000bcca55ad1c93b6f212e11.tar.xz
lib/mysql-functions, lib/common-functions: mysql_query_and_delete_unneeded_binary_packages() new
Diffstat (limited to 'lib/common-functions')
-rwxr-xr-xlib/common-functions14
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/common-functions b/lib/common-functions
index cb39509..921a7b3 100755
--- a/lib/common-functions
+++ b/lib/common-functions
@@ -218,19 +218,7 @@ remove_old_package_versions() {
"${tmp_dir}/db-removes"
printf 'DELETE `binary_packages_in_repositories` FROM `binary_packages_in_repositories`'
printf ' JOIN `del` ON `binary_packages_in_repositories`.`id`=`del`.`id`;\n'
- printf 'SELECT CONCAT("pool/",'
- mysql_package_name_query
- printf ') FROM `binary_packages`'
- mysql_join_binary_packages_architectures
- printf ' WHERE NOT EXISTS ('
- printf 'SELECT 1 FROM `binary_packages_in_repositories`'
- printf ' WHERE `binary_packages_in_repositories`.`package`=`binary_packages`.`id`'
- printf ');\n'
- printf 'DELETE `binary_packages` FROM `binary_packages`'
- printf ' WHERE NOT EXISTS ('
- printf 'SELECT 1 FROM `binary_packages_in_repositories`'
- printf ' WHERE `binary_packages_in_repositories`.`package`=`binary_packages`.`id`'
- printf ');\n'
+ mysql_query_and_delete_unneeded_binary_packages
} | \
mysql_run_query | \
sort -u >> \