[arch-dev-public] [PATCH] Added seperate dryrun options for the packages and sources cleanup scripts

Eric Bélanger snowmaniscool at gmail.com
Wed Nov 24 21:13:13 CET 2010


Signed-off-by: Eric Bélanger <snowmaniscool at gmail.com>
---
 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"
 }
-- 
1.7.3.2



More information about the arch-dev-public mailing list