]> git.decadent.org.uk Git - dak.git/blob - debian/cron.buildd
LOCAL: Remove replay check
[dak.git] / debian / cron.buildd
1 #! /bin/sh
2 #
3 # Called from cron.unchecked to update wanna-build, each time it runs.
4 #
5 ssh buildd@buildd /org/wanna-build/trigger.often
6 exit 0
7
8 cleanup() {
9         rm -f "$LOCKFILE"
10         kill -TERM $SSH_PID
11 }
12
13 ARCHS="alpha arm hppa i386 ia64 m68k mips mipsel powerpc sparc s390"
14
15 set -e
16 export SCRIPTVARS=/org/ftp.debian.org/dak/config/debian/vars
17 . $SCRIPTVARS
18
19 LOCKFILE="/org/wanna-build/tmp/DB_Maintenance_In_Progress"
20
21 if [ ! -e "$ftpdir/Archive_Maintenance_In_Progress" ]; then
22         if lockfile -r3 $LOCKFILE; then
23                 trap cleanup 0
24                 cd /org/incoming.debian.org/buildd
25                 cp /org/wanna-build/tmp/Sources.unstable-old Sources
26                 gzip -cd Sources.gz >> Sources
27                 for a in $ARCHS; do
28                         cp /org/wanna-build/tmp/Packages.unstable.$a-old Packages
29                         gzip -cd /org/incoming.debian.org/buildd/Packages.gz >> Packages
30                         quinn-diff -i -a /org/buildd.debian.org/web/quinn-diff/Packages-arch-specific -A $a 2>/dev/null | perl -pi -e 's#^(non-free)/.*$##msg' | wanna-build -b $a/build-db --merge-partial-quinn 2> /dev/null
31                         wanna-build -A $a -b $a/build-db --merge-packages Packages 2>/dev/null
32                 done
33                 rm -f Sources Packages
34         fi
35 fi