From: James Troup Date: Tue, 13 Feb 2007 12:40:03 +0000 (+0000) Subject: [rmurray] debian/cron.daily: various cleanups and improvements. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24a8203e0a3f35bdfb3526e27d686923bb4b459d;p=dak [rmurray] debian/cron.daily: various cleanups and improvements. --- diff --git a/ChangeLog b/ChangeLog index 0b8578a4..3e6e33ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2007-02-08 Ryan Murray + * config/debian/cron.daily: track when we have the accepted lock + and clean it up on exit if we have it. Take/check the + cron.unchecked lock just before traping to cleanup on exit. + Remove potato override handling. Remove any dangling symlinks in + /srv/incoming.d.o/buildd. Clean up apt-ftparchive's databases. + * config/debian/apt.conf: change default compression scheme for both Sources and Packages to gzip and bzip2 rather than uncompressed and gzip (Packages) and gzip (Sources). Use old diff --git a/config/debian/cron.daily b/config/debian/cron.daily index 333f4e09..163a6704 100755 --- a/config/debian/cron.daily +++ b/config/debian/cron.daily @@ -14,15 +14,19 @@ TS=0 NOTICE="$ftpdir/Archive_Maintenance_In_Progress" LOCKCU="$lockdir/daily.lock" LOCKAC="$lockdir/unchecked.lock" +lockac=0 cleanup() { rm -f "$NOTICE" rm -f "$LOCKCU" + if [ "$lockac" -eq "1" ]; then + rm -f "$LOCKAC" + fi } +lockfile -l 3600 $LOCKCU trap cleanup 0 rm -f "$NOTICE" -lockfile -l 3600 $LOCKCU cat > "$NOTICE" < override.sid.extra.main # FIXME -rm -f override.potato.all3 override.sid.all3 -for i in main contrib non-free; do cat override.potato.$i >> override.potato.all3; done +rm -f override.sid.all3 for i in main contrib non-free main.debian-installer; do cat override.sid.$i >> override.sid.all3; done TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X) @@ -107,6 +112,7 @@ TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X) # Needs to be rebuilt, as files have moved. Due to unaccepts, we need to # update this before wanna-build is updated. psql projectb -A -t -q -c "SELECT filename FROM queue_build WHERE suite = 5 AND queue = 0 AND in_queue = true AND filename ~ 'd(sc|eb)$'" > $dbdir/dists/unstable_accepted.list +symlinks -d /srv/incoming.debian.org/buildd > /dev/null apt-ftparchive generate apt.conf.buildd TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X) @@ -173,3 +179,10 @@ $scriptsdir/update-ftpstats $base/log/* > $base/misc/ftpstats.data R --slave --vanilla < $base/misc/ftpstats.R TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X) + +# Clean up apt-ftparchive's databases + +cd $configdir +apt-ftparchive -q clean apt.conf + +################################################################################