From: Joerg Jaspert Date: Sat, 29 Jan 2011 12:42:23 +0000 (+0100) Subject: w-b-dump/nfu X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=619251f03f70fa0529b9a36e1a58d0b7db3752fc;p=dak w-b-dump/nfu make the get-w-b-db script work again and move its call to cron.daily Signed-off-by: Joerg Jaspert --- diff --git a/config/debian/cron.daily b/config/debian/cron.daily index 0e7f7da4..0abaa940 100755 --- a/config/debian/cron.daily +++ b/config/debian/cron.daily @@ -31,6 +31,10 @@ wget -q -O${TMPFILE} http://qa.debian.org/data/bts/wnpp_rm chmod go+r ${TMPFILE} mv ${TMPFILE} /srv/ftp-master.debian.org/scripts/masterfiles/wnpp_rm +# Update wanna-build dump +echo "Update wanna-build database dump" +$base/dak/scripts/nfu/get-w-b-db + reports clean_debbugs diff --git a/config/debian/cron.weekly b/config/debian/cron.weekly index 45677cd9..1ff6b2cd 100755 --- a/config/debian/cron.weekly +++ b/config/debian/cron.weekly @@ -50,10 +50,6 @@ echo "Cleanup apt-ftparchive's database" apt-ftparchive -q clean apt.conf apt-ftparchive -q clean apt.conf.buildd -# Update wanna-build dump -echo "Update wanna-build database dump" -$base/dak/scripts/nfu/get-w-b-db - echo "Fixing symlinks in $ftpdir" symlinks -d -r $ftpdir diff --git a/scripts/nfu/get-w-b-db b/scripts/nfu/get-w-b-db index d525fd23..ae8fb1b9 100755 --- a/scripts/nfu/get-w-b-db +++ b/scripts/nfu/get-w-b-db @@ -1,22 +1,40 @@ #!/bin/bash +# Copyright (C) 2008 Joachim Breitner +# Copyright (C) 2011 Joerg Jaspert +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; version 2. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +# exit on errors set -e +# make sure to only use defined variables +set -u +# ERR traps should be inherited from functions too. (And command +# substitutions and subshells and whatnot, but for us the functions is +# the important part here) +set -E -# list of architectures taken from -# http://buildd.debian.org/stats/ +# import the general variable set. +export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars +. $SCRIPTVARS # For debugging, you can override the path using # the WB_DB_DIR enviroment variable -if [ -z "$WB_DB_DIR" ] -then - WB_DB_DIR=/srv/ftp-master.debian.org/scripts/nfu +if [ -z "$WB_DB_DIR" ]; then + WB_DB_DIR=${scriptdir}/nfu fi -cd $WB_DB_DIR || { echo "Failed to cd to $WB_DB_DIR" ; exit 1 ;} - -for arch in alpha amd64 arm armel hppa i386 ia64 mips mipsel powerpc s390 sparc -do - rm -f $arch-all.txt - echo "Getting $arch-all.txt" - wget -q http://buildd.debian.org/stats/$arch-all.txt +for arch in $(dak admin s-a list-arch unstable); do + wget -q http://buildd.debian.org/stats/$arch-all.txt -O ${WB_DB_DIR}/${arch}-all.txt done