summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-09-12 13:58:08 +0200
committerErich Eckner <git@eckner.net>2019-09-12 13:58:08 +0200
commitab868b5cd39b6d3e600ab7d626c4e42ae2361cf9 (patch)
tree05d877128e7b0a484de7ebba74550bd5360a994e
parentf8a5bdb0f6713e5b011e3bcf610ff8bd3a15cd62 (diff)
downloadbuilder-ab868b5cd39b6d3e600ab7d626c4e42ae2361cf9.tar.xz
bin/delete-packages: remove binary package file if no _real_ package requires it anymore
-rwxr-xr-xbin/delete-packages4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/delete-packages b/bin/delete-packages
index 3a615aa..9b5c7cd 100755
--- a/bin/delete-packages
+++ b/bin/delete-packages
@@ -239,7 +239,9 @@ export TMPDIR="${tmp_dir}"
printf ' JOIN `binary_packages`'
printf ' ON `binary_packages`.`id`=`bp_to_delete`.`id`'
mysql_join_binary_packages_binary_packages_in_repositories
- printf ' WHERE NOT EXISTS ('
+ mysql_join_binary_packages_in_repositories_repositories
+ printf ' WHERE `repositories`.`is_on_master_mirror`'
+ printf ' AND NOT EXISTS ('
printf 'SELECT 1'
printf ' FROM `bpir_to_delete`'
printf ' WHERE `bpir_to_delete`.`id`=`binary_packages_in_repositories`.`id`'