[dak/master] 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 <joerg@debian.org>
---
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 311207a..3d573b5 100755
--- a/config/debian/cron.dinstall
+++ b/config/debian/cron.dinstall
@@ -252,6 +252,14 @@ GO=(
stage $GO
GO=(
+ FUNC="autocruft"
+ TIME="autocruft"
+ ARGS="unstable experimental"
+ ERR=""
+)
+stage $GO
+
+GO=(
FUNC="fingerprints"
TIME="import-keyring"
ARGS=""
diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions
index f1693a3..281d428 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 <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
--
2.1.4
Reply to: