#!/bin/bash
# No way I try to deal with a crippled sh just for POSIX foo.
-# Copyright (C) 2009 Joerg Jaspert <joerg@debian.org>
+# Copyright (C) 2009, 2010 Joerg Jaspert <joerg@debian.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
set -E
# import the general variable set.
-export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
+export SCRIPTVARS=/srv/backports-master.debian.org/dak/config/backports/vars
. $SCRIPTVARS
########################################################################
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)")"
)
stage $GO
-GO=(
- FUNC="merkel1"
- TIME="init"
- ARGS=""
- ERR="false"
-)
-stage $GO &
-
GO=(
FUNC="pgdump_pre"
TIME="pg_dump1"
)
stage $GO
-GO=(
- FUNC="updates"
- TIME="External Updates"
- ARGS=""
- ERR="false"
-)
-stage $GO
-
-GO=(
- FUNC="i18n1"
- TIME="i18n 1"
- ARGS=""
- ERR="false"
-)
-stage $GO
-
lockfile "$LOCK_ACCEPTED"
lockfile "$LOCK_NEW"
)
stage $GO
-#GO=(
-# FUNC="opunew"
-# TIME="o-p-u-new"
-# ARGS="oldproposedupdates"
-# ERR="false"
-#)
-#stage $GO
-
GO=(
FUNC="newstage"
TIME="newstage"
)
stage $GO
-GO=(
- FUNC="fingerprints"
- TIME="import-keyring"
- ARGS=""
- ERR="false"
-)
-stage $GO
+# GO=(
+# FUNC="fingerprints"
+# TIME="import-keyring"
+# ARGS=""
+# ERR="false"
+# )
+# stage $GO
GO=(
FUNC="overrides"
)
stage $GO
-GO=(
- FUNC="mkfilesindices"
- TIME="mkfilesindices"
- ARGS=""
- ERR=""
-)
-stage $GO
-
GO=(
FUNC="mkchecksums"
TIME="mkchecksums"
state "postlock"
GO=(
- FUNC="pgdump_post"
- TIME="pg_dump2"
- ARGS=""
- ERR=""
-)
-stage $GO &
-
-GO=(
- FUNC="expire"
- TIME="expire_dumps"
- ARGS=""
- ERR=""
-)
-stage $GO &
-
-GO=(
- FUNC="transitionsclean"
- TIME="transitionsclean"
+ FUNC="changelogs"
+ TIME="changelogs"
ARGS=""
- ERR=""
+ ERR="false"
)
stage $GO &
GO=(
- FUNC="reports"
- TIME="reports"
+ FUNC="pgdump_post"
+ TIME="pg_dump2"
ARGS=""
ERR=""
)
stage $GO &
GO=(
- FUNC="dm"
- TIME=""
+ FUNC="expire"
+ TIME="expire_dumps"
ARGS=""
ERR=""
)
stage $GO &
-GO=(
- FUNC="bts"
- TIME=""
- ARGS=""
- ERR="false"
-)
-stage $GO &
-
-GO=(
- FUNC="merkel2"
- TIME="merkel projectb push"
- ARGS=""
- ERR="false"
-)
-stage $GO &
+# GO=(
+# FUNC="dm"
+# TIME=""
+# ARGS=""
+# ERR=""
+# )
+# stage $GO &
GO=(
FUNC="mirrorpush"
)
stage $GO &
-GO=(
- FUNC="i18n2"
- TIME="i18n 2"
- ARGS=""
- ERR="false"
-)
-stage $GO &
-
GO=(
FUNC="stats"
TIME="stats"
)
stage $GO &
-GO=(
- FUNC="testingsourcelist"
- TIME=""
- ARGS=""
- ERR="false"
-)
-stage $GO &
-
rm -f "${LOCK_BRITNEY}"
-GO=(
- FUNC="pgdakdev"
- TIME="dak-dev db"
- ARGS=""
- ERR="false"
-)
-stage $GO &
-
-GO=(
- FUNC="merkel3"
- TIME="merkel ddaccessible sync"
- ARGS=""
- ERR="false"
-)
-stage $GO &
-
GO=(
FUNC="compress"
TIME="compress"
)
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"