From: Debian BTS Date: Sat, 9 Jun 2007 23:15:25 +0000 (+0000) Subject: add changes by collin to fix stable debian specific issues X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=7b3ec930109e85b219939c4531b35ef18ecce23d add changes by collin to fix stable debian specific issues --- diff --git a/examples/debian/versions/update-mldbm b/examples/debian/versions/update-mldbm index 9a89302..c844b2d 100755 --- a/examples/debian/versions/update-mldbm +++ b/examples/debian/versions/update-mldbm @@ -4,10 +4,72 @@ cd /org/bugs.debian.org/versions/indices ARCHIVES='ftp' # security -- should be included too, but too difficult to deal with -../bin/build-versions-db versions.idx versions_time.idx \ - /srv/bugs.debian.org/versions/indices/ftp \ - oldstable stable proposed-updates \ - testing \ - testing-proposed-updates \ - unstable \ - experimental; +# Nuke old versions of versions.idx.new in case there's one hanging about +rm -f versions.idx.new +# This index is much larger and keeps track of historic versions of +# packages, and is used for expiring bugs +rm -f versions_time.idx.new +if [ -e versions_time.idx ]; then + cp versions_time.idx versions_time.idx.new; +fi; + +set -e +for archive in $ARCHIVES; do + case $archive in + ftp) + SUITES='oldstable stable proposed-updates testing testing-proposed-updates unstable experimental' + di_main='main main/debian-installer' + ;; + nonus) + SUITES='oldstable' + di_main='main' + ;; + security) + SUITES='oldstable stable testing' + di_main='main' + ;; + esac + for suite in $SUITES; do + if [ "$suite" != "oldstable" ] || [ -d /org/bugs.debian.org/etc/indices/$archive/$suite ]; then + case $suite in + oldstable) + ARCHES='alpha arm hppa i386 ia64 m68k mips mipsel powerpc s390 sparc' + ;; + stable|proposed-updates) + ARCHES='alpha arm hppa i386 ia64 mips mipsel powerpc s390 sparc' + ;; + testing|testing-proposed-updates) + ARCHES='alpha amd64 arm hppa i386 ia64 mips mipsel powerpc s390 sparc' + ;; + unstable|experimental) + ARCHES='alpha amd64 arm hppa hurd-i386 i386 ia64 m68k mips mipsel powerpc s390 sparc' + ;; + esac + case $suite in + oldstable|experimental) + COMPONENTS='main contrib non-free' + ;; + stable|proposed-updates|testing|testing-proposed-updates|unstable) + COMPONENTS="$di_main contrib non-free" + ;; + esac + for component in $COMPONENTS; do + for arch in $ARCHES; do + zcat "/org/bugs.debian.org/etc/indices/$archive/$suite/$component/binary-$arch/Packages.gz" | ../bin/build-mldbm.pl "$archive" "$suite" "$arch" + done + if [ "$component" != main/debian-installer ]; then + zcat "/org/bugs.debian.org/etc/indices/$archive/$suite/$component/source/Sources.gz" | ../bin/build-mldbm.pl "$archive" "$suite" source + fi + done + fi + done +done + +# This removes old versions +../bin/versions_time_cleanup + +chmod 664 versions.idx.new +mv versions.idx.new versions.idx + +chmod 664 versions_time.idx.new +mv versions_time.idx.new versions_time.idx