X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fdinstall.functions;h=635d99c4bf6b21c1b30d3f7f04f90e4a0ea39869;hb=cf8ebc90d6f676442029880c7302f06093a66654;hp=1834841b74b1ad04505b0aca1e093f63d92af4eb;hpb=6cb0b0401eaeeb6900551c20617f0a8f2293cd89;p=dak.git diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index 1834841b..635d99c4 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -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 }