X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=trigger.daily;h=db967a86261b7998b30a6b4105a44297425256ef;hb=86b305f67df4516587fc12d27ed1bfc859690753;hp=898b09478e74a15437e6cdef4ba1eec0316b4a1e;hpb=bf295e4afd27dbde46c838590f556f21ea4dd993;p=wannabuild.git diff --git a/trigger.daily b/trigger.daily index 898b094..db967a8 100755 --- a/trigger.daily +++ b/trigger.daily @@ -14,45 +14,16 @@ PATH="/bin:/usr/bin" DISTS="stable-security testing-security stable testing unstable" STATS_DISTS="unstable testing stable" SECTIONS="main contrib non-free" -ARCHS_oldstable="m68k arm sparc alpha powerpc i386 mips mipsel ia64 hppa s390" -ARCHS_stable="arm sparc alpha powerpc i386 amd64 mips mipsel ia64 hppa s390" -ARCHS_testing="$ARCHS_stable armel" -ARCHS_unstable="$ARCHS_testing" TMPDIR="/org/wanna-build/tmp" +LIBTRIGGER="/org/wanna-build/libtrigger.sh" LOCKFILE="/org/wanna-build/tmp/DB_Maintenance_In_Progress" MASTER="http://incoming.debian.org/debian/dists" MASTERBUILDD="http://incoming.debian.org/buildd" SECMASTER="http://security-master.debian.org/debian-security/dists" SECMASTERBUILDD=http://security-master.debian.org/buildd -CURLOPT="-q -s -S -R -f -Y 10 -y 120 -K /srv/wanna-build/trigger.curlrc" NEWARCH="" -curl_index () { - local url tmpname destname appendname curlopt - url="$1" - destname="$2" - appendname="$3" - tmpname=".$destname" - rc=0 - rm -f "$tmpname" - if [ -e "$destname" ]; then - refdate=`perl -e "print scalar gmtime(((stat ('$destname'))[9]))"` - curl $CURLOPT -z "$refdate" "$url" -o "$tmpname" - rc=$? - else - curl $CURLOPT "$url" -o "$tmpname" - rc=$? - fi - if [ $rc -eq 0 -a -e "$tmpname" ]; then - if gzip -t "$tmpname"; then - mv "$tmpname" "$destname" - else - rc=$? - fi - fi - gzip -dc "$destname" >> "$appendname" - return $rc -} +. "$LIBTRIGGER" DAY=`date +%w` @@ -163,11 +134,11 @@ for d in $DISTS; do fi for a in $ARCHS; do - quinn-diff -A $a -a /srv/buildd.debian.org/web/quinn-diff/Packages-arch-specific -s Sources.$d -p Packages.$d.$a >> quinn-$d.$a 2>/dev/null + quinn-diff -A $a -a /srv/buildd.debian.org/web/quinn-diff/$dist/Packages-arch-specific -s Sources.$d -p Packages.$d.$a >> quinn-$d.$a 2>/dev/null if echo $d | grep -qv -- -security; then if [ "$d" != "unstable" ]; then cat "Packages.$d.$a" >> "Packages.$d-p-u.$a" - quinn-diff -A $a -a /srv/buildd.debian.org/web/quinn-diff/Packages-arch-specific -s Sources.$d-p-u -p Packages.$d-p-u.$a >> quinn-$d-p-u.$a 2>/dev/null + quinn-diff -A $a -a /srv/buildd.debian.org/web/quinn-diff/$dist/Packages-arch-specific -s Sources.$d-p-u -p Packages.$d-p-u.$a >> quinn-$d-p-u.$a 2>/dev/null sed -e 's/\[[-a-z]*:[-a-z]*\]$//' quinn-$d.$a > quinn-$d.$a.grep if [ ! -z quinn-$d.$a.grep ]; then fgrep -vf quinn-$d.$a.grep quinn-$d-p-u.$a > quinn-$d.$a @@ -187,7 +158,12 @@ echo "fetch and quinn completed: `date -u`" 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