]> git.decadent.org.uk Git - dak.git/blobdiff - config/backports/cron.dinstall
updates
[dak.git] / config / backports / cron.dinstall
index 15e339f3e12d71284a7138d4f491ba1c00fc85a1..33d4bc70230c93bcddf47ce860766784cd35a03c 100755 (executable)
@@ -152,6 +152,13 @@ umask 022
 export LANG=C
 export LC_ALL=C
 
+# If we did not install new packages, we dont want to run.
+if ! [ -f "${DINSTALLPACKAGES}" ]; then
+    log "nothing to do"
+    exit 0
+fi
+rm -f "${DINSTALLPACKAGES}"
+
 touch "${DINSTALLSTART}"
 ts "startup"
 DINSTALLBEGIN="$(date -u +"%a %b %d %T %Z %Y (%s)")"
@@ -172,9 +179,9 @@ GO=(
 stage $GO
 
 GO=(
-    FUNC="pgdump_pre"
+    FUNC="pg_timestamp"
     TIME="pg_dump1"
-    ARGS=""
+    ARGS="predinstall"
     ERR=""
 )
 stage $GO
@@ -182,6 +189,14 @@ stage $GO
 lockfile "$LOCK_ACCEPTED"
 lockfile "$LOCK_NEW"
 
+GO=(
+    FUNC="punew"
+    TIME="p-u-new"
+    ARGS="proposedupdates"
+    ERR="false"
+)
+stage $GO
+
 GO=(
     FUNC="newstage"
     TIME="newstage"
@@ -293,14 +308,6 @@ GO=(
 )
 stage $GO
 
-GO=(
-    FUNC="mkuploaders"
-    TIME="mkuploaders"
-    ARGS=""
-    ERR=""
-)
-stage $GO
-
 GO=(
     FUNC="copyoverrides"
     TIME="copyoverrides"
@@ -341,24 +348,24 @@ ts "locked part finished"
 state "postlock"
 
 GO=(
-    FUNC="pgdump_post"
-    TIME="pg_dump2"
+    FUNC="changelogs"
+    TIME="changelogs"
     ARGS=""
-    ERR=""
+    ERR="false"
 )
 stage $GO &
 
 GO=(
-    FUNC="expire"
-    TIME="expire_dumps"
-    ARGS=""
+    FUNC="pg_timestamp"
+    TIME="pg_dump2"
+    ARGS="postdinstall"
     ERR=""
 )
 stage $GO &
 
 GO=(
-    FUNC="reports"
-    TIME="reports"
+    FUNC="expire"
+    TIME="expire_dumps"
     ARGS=""
     ERR=""
 )
@@ -391,20 +398,23 @@ stage $GO &
 rm -f "${LOCK_BRITNEY}"
 
 GO=(
-    FUNC="compress"
-    TIME="compress"
+    FUNC="cleantransactions"
+    TIME=""
     ARGS=""
     ERR=""
 )
 stage $GO &
 
-GO=(
-    FUNC="aptftpcleanup"
-    TIME="apt-ftparchive cleanup"
-    ARGS=""
-    ERR="false"
-)
-stage $GO
+# GO=(
+#     FUNC="aptftpcleanup"
+#     TIME="apt-ftparchive cleanup"
+#     ARGS=""
+#     ERR="false"
+# )
+# stage $GO
+
+# we need to wait for the background processes before the end of dinstall
+wait
 
 log "Daily cron scripts successful, all done"