From aa66a556adb29876801da52fc69b168c6e995d88 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Tue, 13 Nov 2012 20:00:10 +0100 Subject: [PATCH] config/debian-security/cron.unchecked: calling process-policy once per queue is enough --- config/debian-security/cron.unchecked | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/config/debian-security/cron.unchecked b/config/debian-security/cron.unchecked index 3cfde7a1..784ac371 100755 --- a/config/debian-security/cron.unchecked +++ b/config/debian-security/cron.unchecked @@ -18,14 +18,6 @@ doanything=false dopolicy=false LOCKFILE="$lockdir/unchecked.lock" -# So first we should go and see if any process-policy action is done -dak process-policy embargoed | mail -a "X-Debian: DAK" -e -s "Automatically accepted from embargoed" team@security.debian.org -- -F "Debian FTP Masters" -f ftpmaster@ftp-master.debian.org -dak process-policy unembargoed | mail -a "X-Debian: DAK" -e -s "Automatically accepted from unembargoed" team@security.debian.org -- -F "Debian FTP Masters" -f ftpmaster@ftp-master.debian.org - -# Now, if this really did anything, we can then sync it over. Files -# in newstage mean they are (late) accepts of security stuff, need -# to sync to ftp-master - cleanup() { rm -f "$LOCKFILE" } @@ -36,14 +28,14 @@ if ! lockfile -r8 "$LOCKFILE"; then fi trap cleanup EXIT -for queue in embargoed; do +for queue in embargoed unembargoed; do echo "$timestamp: processing ${queue}" >> ${report} - dak process-policy ${queue} >> ${report} - accepted=$(find ${queuedir}/accepted -type f -name "*.changes") - if [ -n "${accepted}" ]; then - dopolicy=true - fi + dak process-policy ${queue} | mail -a "X-Debian: DAK" -e -s "Automatically accepted from ${queue}" team@security.debian.org -- -F "Debian FTP Masters" -f ftpmaster@ftp-master.debian.org done +accepted=$(find ${queuedir}/accepted -type f -name "*.changes") +if [ -n "${accepted}" ]; then + dopolicy=true +fi cd $unchecked changes=$(find . -maxdepth 1 -mindepth 1 -type f -name \*.changes | sed -e "s,./,," | xargs) -- 2.39.5