From a5d1166a9ce4075f91653524b877ac83082c7344 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Thu, 11 Jun 2015 14:09:48 +0200 Subject: [PATCH] Add autocruft function, calling (guess) auto_decruft For now only with -n and then mail out what it thinks it would do. Signed-off-by: Joerg Jaspert --- config/debian/cron.dinstall | 8 ++++++++ config/debian/dinstall.functions | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall index 311207af..3d573b5b 100755 --- a/config/debian/cron.dinstall +++ b/config/debian/cron.dinstall @@ -251,6 +251,14 @@ GO=( ) stage $GO +GO=( + FUNC="autocruft" + TIME="autocruft" + ARGS="unstable experimental" + ERR="" +) +stage $GO + GO=( FUNC="fingerprints" TIME="import-keyring" diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index f1693a32..281d4287 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -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 " -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 -- 2.39.2