From 4baff63b94d3921526884e5f16d70fdec815d711 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 25 Sep 2018 22:26:11 -0400 Subject: Revert "Revert "Teach db-cleanup to clean old torrents, rather than having make_repo_torrents do it"" When I reverted this commit, I said: > Since make_repo_torrents will now only place symlinks in TORRENTPOOL, the > dead symlink removal will now handle it automatically, and db-cleanup needs > no special knowledge of TORRENTPOOL. However, that only means that we can *eventually* revert this. There are still currently a ton of old plain files in TORRENTPOOL that need cleaned up first. Consider reverting this when the following comes back empty: find "${FTP_DIR}/${TORRENTPOOL}" -type f This reverts commit 840c13924da569fc38f45181b5ac2a059b6b143e. --- cron-jobs/db-cleanup | 2 +- db-cleanup.conf | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cron-jobs/db-cleanup b/cron-jobs/db-cleanup index de92e21..fc7fd25 100755 --- a/cron-jobs/db-cleanup +++ b/cron-jobs/db-cleanup @@ -40,7 +40,7 @@ done | cut -d'/' -f1 | sort -u | sed "s|$|*|" > "$filter" msg "Removing old files:" -for POOL in "${PKGPOOLS[@]}" "${SRCPOOLS[@]}"; do +for POOL in "${PKGPOOLS[@]}" "${SRCPOOLS[@]}" "${TORRENTPOOLS[@]}"; do msg2 '%s' "${POOL}" rsync "${EXTRAFLAGS[@]}" -va --delete-excluded \ diff --git a/db-cleanup.conf b/db-cleanup.conf index 12d65f9..9944438 100644 --- a/db-cleanup.conf +++ b/db-cleanup.conf @@ -1,6 +1,6 @@ #!/hint/bash -# Both PKGPOOLS and SRCPOOLS are relative to `config:FTP_BASE`. +# All `*POOLS` variables are relative to `config:FTP_BASE`. # Directories where packages are shared between repos PKGPOOLS=( @@ -11,7 +11,7 @@ PKGPOOLS=( pool/community # Arch Linux (community) ) -# Directories where sources are stored +# Directories where source-packages are stored SRCPOOLS=( sources/parabola # Parabola GNU/Linux-libre sources/alarm # Arch Linux ARM @@ -19,3 +19,8 @@ SRCPOOLS=( sources/packages # Arch Linux (project) sources/community # Arch Linux (community) ) + +# Directories where torrents are stored +TORRENTPOOLS=( + torrents +) -- cgit v1.2.2