]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/dinstall.functions
Enable the new contents generation for experimental.
[dak.git] / config / debian / dinstall.functions
index 1834841b74b1ad04505b0aca1e093f63d92af4eb..635d99c4bf6b21c1b30d3f7f04f90e4a0ea39869 100644 (file)
@@ -4,14 +4,14 @@ function ts() {
         echo "Archive maintenance timestamp ($1): $(date +%H:%M:%S)"
 }
 
-# Remove all locks
-function remove_locks() {
-    rm -f $LOCK_DAILY $LOCK_ACCEPTED $LOCK_NEW
+# Remove daily lock
+function remove_daily_lock() {
+    rm -f $LOCK_DAILY
 }
 
-# trap handler for cleaning up on signal / error
-function cleanup() {
-    remove_locks
+# Remove all locks
+function remove_all_locks() {
+    rm -f $LOCK_DAILY $LOCK_ACCEPTED $LOCK_NEW
 }
 
 # If we error out this one is called, *FOLLOWED* by cleanup above
@@ -209,6 +209,8 @@ function packages() {
     cd $configdir
     #apt-ftparchive generate apt.conf
     dak generate-packages-sources
+    #TEST: try experimental
+    dak contents -s experimental generate
 }
 
 function pdiff() {
@@ -525,16 +527,11 @@ function compress() {
     cd $base/backup/
     find -maxdepth 1 -mindepth 1 -type f -name 'dump_pre_*' -mtime +2 -print0 | xargs -0 --no-run-if-empty rm
 
-    find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' -mmin +720 |
-    while read dumpname; do
-        echo "Compressing $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 -9fv "$dumpname"
-    done
+    find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' \! -name '*.xz' -mmin +720 -print0 \
+        | xargs --no-run-if-empty -0 -P4 -n16 xz -9v
+
+    find -maxdepth 1 -mindepth 1 -type f -name "dumpall_*" \! -name '*.bz2' \! -name '*.gz' \! -name '*.xz' -mmin +720 \
+        | xargs --no-run-if-empty -0 -P4 -n16 xz -9v
     finddup -l -d $base/backup
 }