From 6e95d7e9d8ef1746fd3420e8071321ddc427b541 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Tue, 7 Sep 2010 00:16:40 +0200 Subject: [PATCH] Only run a dinstall when unchecked had something to do before Signed-off-by: Joerg Jaspert --- config/backports/cron.dinstall | 7 +++++++ config/backports/cron.unchecked | 4 ++++ config/backports/dinstall.variables | 3 +++ 3 files changed, 14 insertions(+) diff --git a/config/backports/cron.dinstall b/config/backports/cron.dinstall index b26626af..ab171f43 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 fbda8619..08fcbf3e 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 4dedfcad..d6d7bb3a 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" -- 2.39.2