From: Joerg Jaspert Date: Mon, 6 Sep 2010 22:16:40 +0000 (+0200) Subject: Only run a dinstall when unchecked had something to do before X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=6e95d7e9d8ef1746fd3420e8071321ddc427b541;p=dak.git Only run a dinstall when unchecked had something to do before Signed-off-by: Joerg Jaspert --- 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"