]> err.no Git - dak/commitdiff
Only run a dinstall when unchecked had something to do before
authorJoerg Jaspert <joerg@debian.org>
Mon, 6 Sep 2010 22:16:40 +0000 (00:16 +0200)
committerJoerg Jaspert <joerg@debian.org>
Mon, 6 Sep 2010 22:16:40 +0000 (00:16 +0200)
Signed-off-by: Joerg Jaspert <joerg@debian.org>
config/backports/cron.dinstall
config/backports/cron.unchecked
config/backports/dinstall.variables

index b26626af482683570f0de9ce5f20157f46044eed..ab171f43504a95ad9ec4ca5accb6bbb18c3aa77e 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)")"
index fbda8619c20d5d8ee79a1209e7c316c2669cb30b..08fcbf3eec2ade9573cdbd3ccac4e6dba8928dda 100755 (executable)
@@ -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)"
index 4dedfcad74eaadc7caf24fc66c6e9fea1af0ae3e..d6d7bb3a6c1a1db05e316ad13a7233ab08b9ff1a 100644 (file)
@@ -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"