]> git.decadent.org.uk Git - dak.git/commitdiff
Add autocruft function, calling (guess) auto_decruft
authorJoerg Jaspert <joerg@debian.org>
Thu, 11 Jun 2015 12:09:48 +0000 (14:09 +0200)
committerJoerg Jaspert <joerg@debian.org>
Thu, 11 Jun 2015 12:09:48 +0000 (14:09 +0200)
For now only with -n and then mail out what it thinks it would do.

Signed-off-by: Joerg Jaspert <joerg@debian.org>
config/debian/cron.dinstall
config/debian/dinstall.functions

index 311207af96fa99efae11ea755f516bac3b164fd8..3d573b5bead39a010c1378bb5e75492be31b5656 100755 (executable)
@@ -251,6 +251,14 @@ GO=(
 )
 stage $GO
 
+GO=(
+    FUNC="autocruft"
+    TIME="autocruft"
+    ARGS="unstable experimental"
+    ERR=""
+)
+stage $GO
+
 GO=(
     FUNC="fingerprints"
     TIME="import-keyring"
index f1693a3292fffc7ae1d3a8f0be97b301c2ef6a84..281d428782391cea5c8042c1acf492dc51a3ca48 100644 (file)
@@ -107,6 +107,18 @@ function dominate() {
     dak dominate
 }
 
+function autocruft() {
+    log "Check for obsolete binary packages"
+    suites=${1:-"unstable experimental"}
+    # Initially only run with -n and output into a file, to check.
+    dstamp=$(date -u +"%Y-%m-%d_%H:%M")
+    echo "Report for ${dstamp}" > $webdir/auto-cruft-report_${dstamp}.txt
+    for suite in ${suites}; do
+        dak auto-decruft -n -s ${suite} >> $webdir/auto-cruft-report_${dstamp}.txt
+    done
+    cat $webdir/auto-cruft-report_${dstamp}.txt | mail -a "X-Debian: DAK" -e -s "Debian archive AUTOMATIC cruft report for ${dstamp}" -a "From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>" -c niels@thykier.net ftpmaster@ftp-master.debian.org
+}
+
 function fingerprints() {
     log "Updating fingerprints"
     dak import-keyring -L /srv/keyring.debian.org/keyrings/debian-keyring.gpg