summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-06-18 21:01:23 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-06-18 21:01:23 -0400
commitd433fbd1da44acdf3dd50abce428fe57912f9fa7 (patch)
tree5c32b141f92816b4a7ff6c5fa6caf494e6dce567
parentf6b561c1ef3fd1ec0c0abba0e426ef769e14d0a0 (diff)
remove db-cleanup in favor of ftpdir-cleanup
-rw-r--r--config4
-rwxr-xr-xdb-cleanup69
2 files changed, 0 insertions, 73 deletions
diff --git a/config b/config
index fff797d..8b4b8ab 100644
--- a/config
+++ b/config
@@ -53,10 +53,6 @@ SRCEXT=".src.tar.gz"
# Empty (commented out) to get sourceballs for all packages
#ALLOWED_LICENSES=('GPL' 'GPL1' 'GPL2' 'LGPL' 'LGPL1' 'LGPL2' 'LGPL2.1')
-# For db-cleanup
-PKGPOOLS=(pool/{packages,community,parabola})
-SRCPOOLS=(sources/{packages,community,parabola})
-
# Where to send error emails, and who they are from
LIST="dev@lists.parabolagnulinux.org"
FROM="dbscripts+$(whoami)@$(hostname -f)"
diff --git a/db-cleanup b/db-cleanup
deleted file mode 100755
index 54c1ba8..0000000
--- a/db-cleanup
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/bash
-# Syncs pools against themselves using database contents as filter to cleanup
-# them up
-# License: GPLv3
-
-# Principles
-# * Get repos dbs contents
-# * Make them a include list
-# * Rsync pools against themselves removing excluded files
-# * Instant cleanup!
-
-trap_exit() {
- echo
- error "$@"
- exit 1
-}
-
-source "$(dirname "$(readlink -e "$0")")/config"
-source "$(librelib messages)"
-
-# From makepkg
-set -E
-
-trap 'trap_exit "$(gettext "TERM signal caught. Exiting...")"' TERM HUP QUIT
-trap 'trap_exit "$(gettext "Aborted by user! Exiting...")"' INT
-trap 'trap_exit "$(gettext "An unknown error has occurred. Exiting...")"' ERR
-
-EXTRAFLAGS=()
-"${CLEANUP_DRYRUN}" && EXTRAFLAGS+=(--dry-run)
-
-filter=$(mktemp -t "${0##*/}.XXXXXXXXXX")
-trap "rm -f -- $(printf %q "$filter")" EXIT
-
-for _repo in "${PKGREPOS[@]}"; do
- for _arch in "${ARCHES[@]}"; do
- msg "Getting %s-%s database" "${_repo}" "${_arch}"
-
- dbfile="${FTP_BASE}/${_repo}/os/${_arch}/${_repo}${DBEXT}"
-
- if [ ! -r "${dbfile}" ]; then
- warning "Not found"
- continue
- fi
-
- # Echo the contents into a filter file
- bsdtar tf "${dbfile}" | \
- cut -d'/' -f1 | \
- sort -u | \
- sed "s|$|*|" >> "$filter"
-
- done
-done
-
-msg "Removing old files:"
-
-for POOL in "${PKGPOOLS[@]}" "${SRCPOOLS[@]}"; do
- msg2 '%s' "${POOL}"
-
- rsync "${EXTRAFLAGS[@]}" -va --delete-excluded \
- --include-from="$filter" \
- --exclude="*" \
- "${FTP_BASE}/${POOL}/" \
- "${FTP_BASE}/${POOL}/"
-done
-
-msg "Removing dead symlinks:"
-actions=(-print)
-"${CLEANUP_DRYRUN}" || actions+=(-delete)
-find -L "${FTP_BASE}/" -type l "${actions[@]}"