-#!/bin/bash
+#!/bin/bash -x
#
# Updates wanna-build databases after the archive maintenance
# finishes
LANG=C
PATH="/bin:/usr/bin"
#testing must be before unstable so late upld don't build for testing needlessly
-#DISTS="oldstable-security stable-security testing-security oldstable stable testing unstable"
-DISTS="stable-security testing-security stable testing unstable"
+DISTS="oldstable-security stable-security testing-security oldstable stable testing unstable"
+# While oldstable is purged
+#DISTS="stable-security testing-security stable testing unstable"
STATS_DISTS="unstable testing stable"
SECTIONS="main contrib non-free"
TMPDIR="/org/wanna-build/tmp"
umask 027
if [ "$DAY" = "0" ]; then
- savelog -c 26 -p /srv/wanna-build/db/merge.log
+ savelog -c 64 -p /srv/wanna-build/db/merge.log
fi
exec 3<&1 >> /srv/wanna-build/db/merge.log 2>&1
echo "fetch and quinn completed: `date -u`" >&3
umask 002
-for a in $ARCHS_unstable ; do
+# Gross hack: we need a list of all architectures, because this loop
+# insists on iterating on arches and then suites, instead of the
+# opposite.
+ALL_ARCHES=$(echo $ARCHS_oldstable $ARCHS_stable $ARCHS_testing $ARCHS_unstable \
+ | tr ' ' '\n' | sort -u)
+for a in $ALL_ARCHES ; do
wanna-build --create-maintenance-lock --database=$a/build-db
for d in $DISTS ; do
mv quinn-$d.$a quinn-$d.$a-old
done
if [ "$DAY" = "0" ]; then
- savelog -p -c 26 /srv/wanna-build/db/$a/transactions.log
+ savelog -p -c 128 /srv/wanna-build/db/$a/transactions.log
fi
wanna-build --remove-maintenance-lock --database=$a/build-db
done
rm -f "$LOCKFILE"
trap - 0
/srv/buildd.debian.org/bin/makegraph
- for a in $ARCHS_stable; do
+ for a in $ALL_ARCHES; do
echo Last Updated: `date -u` > /srv/buildd.debian.org/web/stats/$a.txt
for d in $STATS_DISTS; do
/srv/wanna-build/bin/wanna-build-statistics --database=$a/build-db --dist=$d >> /srv/buildd.debian.org/web/stats/$a.txt