]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/cron.unchecked
dinstall
[dak.git] / config / debian / cron.unchecked
index 085868287c2204c09977d7a1bb977daeff1d659b..41b664016126c642d12d7bb159d038e9f99f5516 100755 (executable)
@@ -35,7 +35,14 @@ if lockfile -r3 $LOCKFILE; then
        echo "--" >> $report
 
        # sync with debbugs
-       rsync -aq --remove-source-files  $queuedir/bts_version_track/ bugs-sync:/org/bugs.debian.org/versions/queue/ftp-master/
+    rsync -aq -e "ssh -o Batchmode=yes -o ConnectTimeout=30 -o SetupTimeout=30" --remove-source-files  $queuedir/bts_version_track/ bugs-sync:/org/bugs.debian.org/versions/queue/ftp-master/ 2>/dev/null && touch $lockdir/synced_bts_version || true
+
+       NOW=$(date +%s)
+       TSTAMP=$(stat -c %Y $lockdir/synced_bts_version)
+       DIFF=$(( NOW - TSTAMP ))
+       if [ $DIFF -ge 259200 ]; then
+               echo "Kids, you tried your best and you failed miserably. The lesson is, never try. (Homer Simpson)"
+       fi
 
        if lockfile -r3 $NOTICE; then
            LOCKDAILY="YES"
@@ -52,15 +59,16 @@ if lockfile -r3 $LOCKFILE; then
            cd $configdir
            apt-ftparchive -qq -o APT::FTPArchive::Contents=off generate apt.conf.buildd
 
-           cd  ${incoming}/buildd
-           rm -f Release.*
-           apt-ftparchive -qq -o APT::FTPArchive::Release::Origin="Debian" -o APT::FTPArchive::Release::Label="Debian" -o APT::FTPArchive::Release::Description="buildd incoming" -o APT::FTPArchive::Release::Architectures="${archs}" release . > Release
+           cd  ${incoming}
+           rm -f buildd/Release*
+           apt-ftparchive -qq -o APT::FTPArchive::Release::Origin="Debian" -o APT::FTPArchive::Release::Label="Debian" -o APT::FTPArchive::Release::Description="buildd incoming" -o APT::FTPArchive::Release::Architectures="${archs}" release buildd > Release
            gpg --secret-keyring /srv/ftp.debian.org/s3kr1t/dot-gnupg/secring.gpg --keyring /srv/ftp.debian.org/s3kr1t/dot-gnupg/pubring.gpg --no-options --batch --no-tty --armour --default-key 6070D3A1 --detach-sign -o Release.gpg Release 
+               mv Release* buildd/.
 
            cd ${incoming}
            mkdir -p tree/${STAMP}
            cp -al ${incoming}/buildd/. tree/${STAMP}/
-           ln -sf tree/${STAMP} ${incoming}/builddweb
+           ln -sfT tree/${STAMP} ${incoming}/builddweb
            find ./tree -mindepth 1 -maxdepth 1 -not -name "${STAMP}" -type d -print0 | xargs --no-run-if-empty -0 rm -rf
 
            . $configdir/cron.buildd