]> git.donarmstrong.com Git - debbugs.git/blobdiff - examples/debian/versions/update-mldbm
get rid of alpha when appropriate
[debbugs.git] / examples / debian / versions / update-mldbm
index 1df2b74114978121afaf7ae237353b87f79be9d1..09c3e14b2f966b7eeb68331fce0156a4d266ae63 100755 (executable)
@@ -1,4 +1,5 @@
-#! /bin/sh -e
+#! /bin/sh
+set -e
 
 cd /org/bugs.debian.org/versions/indices
 
@@ -14,13 +15,56 @@ if [ -e versions_time.idx ]; then
 fi;
 
 set -e
-../bin/build-versions-db versions.idx.new versions_time.idx.new \
-                        /srv/bugs.debian.org/versions/indices/ftp \
-                        oldstable stable proposed-updates \
-                        testing \
-                        testing-proposed-updates \
-                        unstable \
-                        experimental;
+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 amd64 arm armel hppa i386 ia64 mips mipsel powerpc s390 sparc'
+               ;;
+           stable|proposed-updates)
+               ARCHES='amd64 armel i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc s390 sparc'
+               ;;
+           testing|testing-proposed-updates)
+               ARCHES='amd64 armel i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc s390 sparc'
+               ;;
+           unstable|experimental)
+               ARCHES='alpha amd64 armel hppa hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 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