summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Bélanger <snowmaniscool@gmail.com>2010-11-24 21:13:13 +0100
committerPierre Schmitz <pierre@archlinux.de>2010-11-25 02:35:12 +0100
commitcadd215e9d726030bd7b86396eda47c2c69c1bbb (patch)
treed026c414fa3441a1a2b2bb6828fe76aa4a056caf
parent3455be4e4a3fa1c70580fd6ccb521f61c98c64c2 (diff)
downloaddbscripts-cadd215e9d726030bd7b86396eda47c2c69c1bbb.tar.gz
dbscripts-cadd215e9d726030bd7b86396eda47c2c69c1bbb.tar.xz
Added seperate dryrun options for the packages and sources cleanup scripts
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
-rw-r--r--config1
-rwxr-xr-xcron-jobs/sourceballs4
-rw-r--r--test/lib/common.inc1
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"
}