[dak/master] Only run a dinstall when unchecked had something to do before
Signed-off-by: Joerg Jaspert <joerg@debian.org>
---
config/backports/cron.dinstall | 7 +++++++
config/backports/cron.unchecked | 4 ++++
config/backports/dinstall.variables | 3 +++
3 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/config/backports/cron.dinstall b/config/backports/cron.dinstall
index b26626a..ab171f4 100755
--- a/config/backports/cron.dinstall
+++ b/config/backports/cron.dinstall
@@ -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)")"
diff --git a/config/backports/cron.unchecked b/config/backports/cron.unchecked
index fbda861..08fcbf3 100755
--- a/config/backports/cron.unchecked
+++ b/config/backports/cron.unchecked
@@ -33,6 +33,8 @@ LOCKFILE="$lockdir/unchecked.lock"
LOCK_NEW="$lockdir/processnew.lock"
NOTICE="$lockdir/daily.lock"
LOCK_BUILDD="$lockdir/buildd.lock"
+# The state file telling us we have something new to do
+DINSTALLPACKAGES="${lockdir}/dinstall.packages"
# our name
PROGRAM="unchecked"
@@ -96,8 +98,10 @@ do_newstage
do_unchecked
if [ ! -z "$changes" ]; then
+ touch ${DINSTALLPACKAGES}
sync_debbugs
do_buildd
+
# echo "Starting g-p-s: $(date +%H:%M:%S)"
# do_dists
# echo "Done with g-p-s: $(date +%H:%M:%S)"
diff --git a/config/backports/dinstall.variables b/config/backports/dinstall.variables
index 4dedfca..d6d7bb3 100644
--- a/config/backports/dinstall.variables
+++ b/config/backports/dinstall.variables
@@ -48,3 +48,6 @@ DINSTALLSTATE="${webdir}/dinstall.status"
# The mirror trace file
TRACEFILE="${ftpdir}/project/trace/backports-master.debian.org"
+
+# The state file telling us we have something new to do
+DINSTALLPACKAGES="${lockdir}/dinstall.packages"
--
1.5.6.5
Reply to: