]> git.decadent.org.uk Git - dak.git/commitdiff
Don't generate the cruft report in-place
authorEmilio Pozuelo Monfort <pochu@debian.org>
Fri, 27 May 2016 10:03:37 +0000 (12:03 +0200)
committerEmilio Pozuelo Monfort <pochu@debian.org>
Fri, 27 May 2016 10:03:37 +0000 (12:03 +0200)
So that we don't get an empty or incomplete report while it
is being generated.

Signed-off-by: Emilio Pozuelo Monfort <pochu@debian.org>
config/debian/common

index 870f71316267c6870c457e5b65741a660245d143..a8f56dd07e529f66b1071ab9d43737a7a0ef3ccb 100755 (executable)
@@ -223,8 +223,9 @@ function reports() {
     dak queue-report -d backports-new,backports-policy | mail -a "X-Debian: DAK" -e -s "NEW and POLICY on $(date +%D)" -a "From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>" backports-team@debian.org
     # and one on crufty packages
     log "Sending information about crufty packages"
-    dak cruft-report -R > $webdir/cruft-report-daily.txt
-    dak cruft-report -R -s experimental >> $webdir/cruft-report-daily.txt
+    dak cruft-report -R > $webdir/cruft-report-daily.txt.new
+    dak cruft-report -R -s experimental >> $webdir/cruft-report-daily.txt.new
+    mv $webdir/cruft-report-daily.txt.new $webdir/cruft-report-daily.txt
     mail -a "X-Debian: DAK" -e -s "Debian archive cruft report for $(date +%D)" -a "From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>" ftpmaster@ftp-master.debian.org < $webdir/cruft-report-daily.txt
 }