]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian-security/cron.buildd
Switch to "jessie" as stable.
[dak.git] / config / debian-security / cron.buildd
index 970a232263f3e9a8d9307db7ff1c6dccda37bd33..33f847c35db0fbe4bff26c7c90e6d6fcbc1a6e8e 100755 (executable)
@@ -3,12 +3,13 @@
 # Executed after cron.unchecked
 
 set -e
+set -o pipefail
 set -u
 
 export SCRIPTVARS=/srv/security-master.debian.org/dak/config/debian-security/vars
 . $SCRIPTVARS
 SSH_SOCKET=~/.ssh/buildd.debian.org.socket
-DISTS=$(dak admin s list)
+DISTS="stable testing"
 
 if [ -e $ftpdir/Archive_Maintenance_In_Progress ]; then
     exit 0
@@ -19,8 +20,8 @@ now=$(date +%s)
 check=$(( now - 3*60 ))
 
 for dist in $DISTS; do
-    smodtime=$(stat -c "%Y" $base/buildd/$dist/Sources.gz)
-    pmodtime=$(stat -c "%Y" $base/buildd/$dist/Packages.gz)
+    smodtime=$(stat -c "%Y" $base/build-queues/dists/buildd-$dist/updates/*/source/Sources.gz | sort -n | tail -1)
+    pmodtime=$(stat -c "%Y" $base/build-queues/dists/buildd-$dist/updates/*/binary-*/Packages.gz | sort -n | tail -1)
 
     if [ ${smodtime} -gt ${check} ] || [ ${pmodtime} -gt ${check} ]; then
         # Packages/Sources changed in the last minutes
@@ -40,12 +41,18 @@ if [ ! -z "${dists}" ]; then
     trap 'kill -TERM $SSH_PID' 0
     for d in ${dists}; do
         case ${d} in
-            stable)
+            oldoldstable)
                 send=squeeze
                 ;;
-            testing)
+            oldstable)
                 send=wheezy
                 ;;
+            stable)
+                send=jessie
+                ;;
+            testing)
+                send=stretch
+                ;;
             *)
                 send=unknown
                 ;;