]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/cron.dinstall
dinstall
[dak.git] / config / debian / cron.dinstall
index edd6f6c6f13c2e3cb851d07b0f3b9a72b633139c..cf96d6d30e71cbf7420c5b1a06a0e3b022297c8e 100755 (executable)
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
+# Homer: Are you saying you're never going to eat any animal again? What
+#        about bacon?
+# Lisa: No.
+# Homer: Ham?
+# Lisa: No.
+# Homer: Pork chops?
+# Lisa: Dad, those all come from the same animal.
+# Homer: Heh heh heh. Ooh, yeah, right, Lisa. A wonderful, magical animal.
+
 # exit on errors
 set -e
 # make sure to only use defined variables
 set -u
+# ERR traps should be inherited from functions too. (And command
+# substitutions and subshells and whatnot, but for us the functions is
+# the important part here)
+set -E
 
 # import the general variable set.
 export SCRIPTVARS=/srv/ftp.debian.org/dak/config/debian/vars
@@ -255,7 +268,7 @@ function scripts() {
 function mirror() {
     echo "Regenerating \"public\" mirror/ hardlink fun"
     cd ${mirrordir}
-    rsync -aH --link-dest ${ftpdir} --delete --delete-after --ignore-errors ${ftpdir}/. .
+    rsync -aH --link-dest ${ftpdir} --exclude Archive_Maintenance_In_Progress --delete --delete-after --ignore-errors ${ftpdir}/. .
 }
 
 function wb() {
@@ -357,12 +370,12 @@ function compress() {
     find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' -mmin +720 |
     while read dumpname; do
         echo "Compressing $dumpname"
-        bzip2 -9v "$dumpname"
+        bzip2 -9fv "$dumpname"
     done
     find -maxdepth 1 -mindepth 1 -type f -name "dumpall_*" \! -name '*.bz2' \! -name '*.gz' -mmin +720 |
     while read dumpname; do
         echo "Compressing $dumpname"
-        bzip2 -9v "$dumpname"
+        bzip2 -9fv "$dumpname"
     done
     finddup -l -d $base/backup
 }
@@ -520,9 +533,12 @@ NOTICE="$ftpdir/Archive_Maintenance_In_Progress"
 # lock cron.unchecked (it immediately exits when this exists)
 LOCK_DAILY="$lockdir/daily.lock"
 
-# Lock process-new and cron.unchecked from doing work
+# Lock cron.unchecked from doing work
 LOCK_ACCEPTED="$lockdir/unchecked.lock"
 
+# Lock process-new from doing work
+LOCK_NEW="$lockdir/processnew.lock"
+
 # This file is simply used to indicate to britney whether or not
 # the Packages file updates completed sucessfully.  It's not a lock
 # from our point of view
@@ -603,6 +619,7 @@ GO=(
 stage $GO
 
 lockfile "$LOCK_ACCEPTED"
+lockfile "$LOCK_NEW"
 
 GO=(
     FUNC="process_unchecked"
@@ -638,6 +655,7 @@ GO=(
 stage $GO
 
 rm -f "$LOCK_ACCEPTED"
+rm -f "$LOCK_NEW"
 
 GO=(
     FUNC="msfl"