-#!/bin/bash
+#!/bin/bash -x
#
# Updates wanna-build databases after the archive maintenance
# finishes
# Sources.* == uncompressed, concat'd version
LANG=C
-PATH="/bin:/usr/bin"
+PATH="/bin:/usr/bin:/org/wanna-build/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
# double builds.
#
if [ "$d" = "unstable" ]; then
- rm -f "Sources.$d.base"
- cp "Sources.$d" "Sources.$d.base"
- curl_index "$MASTERBUILDD/Sources.gz" "Sources-$d.accepted.gz" "Sources.$d"
+ mv "Sources.$d" "Sources.$d.base"
+ curl_index "$MASTERBUILDD/Sources.gz" "Sources-$d.accepted.gz" "/dev/null"
+ rm -f "Sources-$d.accepted"
+ gunzip "Sources-$d.accepted.gz"
+ keep-latest source "Sources.$d.base" "Sources-$d.accepted" > "Sources.$d"
+
curl_index "$MASTERBUILDD/Packages.gz" "Packages-$d.accepted.gz" "/dev/null"
+ rm -f "Packages-$d.accepted"
+ gunzip "Packages-$d.accepted.gz"
for a in $ARCHS; do
- rm -f "Packages.$d.$a.base"
- cp "Packages.$d.$a" "Packages.$d.$a.base"
+ mv "Packages.$d.$a" "Packages.$d.$a.base"
gzip -dc "Packages-$d.accepted.gz" >> "Packages.$d.$a"
+ keep-latest $a "Packages.$d.$a.base" "Packages-$d.accepted" > "Packages.$d.$a"
done
else
if [ -e "Sources.$d-p-u" ]; then
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