X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fdinstall;h=b6ed073a3c2c82f90046febc38d15b6cc921fcbc;hb=54801e18aa70713b68b77fa6be25cdfe4e6bd152;hp=91d9b536b46e6ee8e1975ac8469d6ca2b20df954;hpb=dd9de7f3a45ad0fb0501653a49f5ccb17365a2ad;p=dak.git diff --git a/config/debian/dinstall b/config/debian/dinstall index 91d9b536..b6ed073a 100755 --- a/config/debian/dinstall +++ b/config/debian/dinstall @@ -63,7 +63,8 @@ function ts() { # Cleanup actions function cleanup() { - savelog -c ${LOGROTATE} -j "$LOGFILE" + rm -f ${LOCK_DAILY} + rm -f ${LOCK_ACCEPTED} } # Setup the notice file to tell bad mirrors they used the wrong time @@ -166,10 +167,9 @@ function i18n1() { # Process the accepted queue function accepted() { log "Processing queue/accepted" - cd "$accepted" - rm -f REPORT - dak process-accepted -pa *.changes | tee REPORT | \ - mail -s "Install for $(date +"%D - %R")" ftpmaster@ftp-master.debian.org + rm -f "$accepted/REPORT" + dak process-accepted -pa -d "$accepted" > "$accepted/REPORT" + cat REPORT | mail -s "Install for $(date +"%D - %R")" ftpmaster@ftp-master.debian.org chgrp debadmin REPORT chmod 664 REPORT } @@ -223,7 +223,7 @@ function release() { dak generate-releases } -function cleanup() { +function dakcleanup() { log "Cleanup old packages/files" dak clean-suites dak clean-queues @@ -407,7 +407,7 @@ function stage() { # We need logs. LOGFILE="$logdir/dinstall.log" -exec > "$LOGFILE" 2>&1 +exec >> "$LOGFILE" 2>&1 # usually we are not using debug logs. Set to 1 if you want them. DEBUG=0 @@ -478,7 +478,7 @@ GO=( FUNC="updates" TIME="External Updates" ARGS="" - ERR="" + ERR="false" ) stage $GO @@ -524,7 +524,7 @@ GO=( ) stage $GO -rm -f $LOCKAC +rm -f "$LOCK_ACCEPTED" GO=( FUNC="msfl" @@ -583,7 +583,7 @@ GO=( stage $GO GO=( - FUNC="cleanup" + FUNC="dakcleanup" TIME="cleanup" ARGS="" ERR="" @@ -733,6 +733,8 @@ stage $GO cat "$LOGFILE" | mail -s "Log for dinstall run of ${NOW}" cron@ftp-master.debian.org +savelog -c ${LOGROTATE} -j "$LOGFILE" + # Now, at the very (successful) end of dinstall, make sure we remove # our stage files, so the next dinstall run will do it all again. rm -f "${stagedir}/*"