From cadd215e9d726030bd7b86396eda47c2c69c1bbb Mon Sep 17 00:00:00 2001 From: Eric Bélanger Date: Wed, 24 Nov 2010 15:13:13 -0500 Subject: Added seperate dryrun options for the packages and sources cleanup scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Eric Bélanger Signed-off-by: Pierre Schmitz --- config | 1 + cron-jobs/sourceballs | 4 ++-- test/lib/common.inc | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config b/config index 01956ba..69f40c7 100644 --- a/config +++ b/config @@ -7,6 +7,7 @@ SRCPOOL='' CLEANUP_DESTDIR="/srv/package-cleanup" CLEANUP_DRYRUN=false SOURCE_CLEANUP_DESTDIR="/srv/source-cleanup" +SOURCE_CLEANUP_DRYRUN=false LOCK_DELAY=10 LOCK_TIMEOUT=300 diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs index 6a86a0d..9ba003a 100755 --- a/cron-jobs/sourceballs +++ b/cron-jobs/sourceballs @@ -119,10 +119,10 @@ old_pkgs=($(comm -23 "${WORKDIR}/available-src-pkgs.sort" "${WORKDIR}/expected-s if [ ${#old_pkgs[@]} -ge 1 ]; then msg "Removing old source packages..." - ${CLEANUP_DRYRUN} && warning 'dry run mode is active' + ${SOURCE_CLEANUP_DRYRUN} && warning 'dry run mode is active' for old_pkg in ${old_pkgs[@]}; do msg2 "${old_pkg}" - ${CLEANUP_DRYRUN} || mv "$FTP_BASE/${SRCPOOL}/${old_pkg}" "${SOURCE_CLEANUP_DESTDIR}" + ${SOURCE_CLEANUP_DRYRUN} || mv "$FTP_BASE/${SRCPOOL}/${old_pkg}" "${SOURCE_CLEANUP_DESTDIR}" done fi diff --git a/test/lib/common.inc b/test/lib/common.inc index 6619c0a..d7ea3d4 100644 --- a/test/lib/common.inc +++ b/test/lib/common.inc @@ -68,6 +68,7 @@ setUp() { STAGING="${TMP}/staging" TMPDIR="${TMP}/tmp" CLEANUP_DRYRUN=false + SOURCE_CLEANUP_DRYRUN=false eot . "${curdir}/../config" } -- cgit v1.2.3-24-g4f1b