From 0f3f9e620e9b977ff72bbcbcc205a1e60ed5b836 Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Thu, 13 Jul 2017 07:30:25 +1000 Subject: Fix some more crashes when APT::Periodic options are set to always Gbp-Dch: ignore --- debian/apt.systemd.daily | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/debian/apt.systemd.daily b/debian/apt.systemd.daily index 5f868e868..40b6692ec 100755 --- a/debian/apt.systemd.daily +++ b/debian/apt.systemd.daily @@ -235,7 +235,9 @@ check_size_constraints() do_cache_backup() { BackupArchiveInterval="$1" - if [ $BackupArchiveInterval -eq 0 ]; then + if [ $BackupArchiveInterval = always ]; then + : + elif [ $BackupArchiveInterval -eq 0 ]; then return fi @@ -406,12 +408,19 @@ Debdelta=1 eval $(apt-config shell Debdelta APT::Periodic::Download-Upgradeable-Packages-Debdelta) # check if we actually have to do anything that requires locking the cache -if [ $UpdateInterval -eq 0 ] && - [ $DownloadUpgradeableInterval -eq 0 ] && - [ $UnattendedUpgradeInterval -eq 0 ] && - [ $BackupArchiveInterval -eq 0 ] && - [ $AutocleanInterval -eq 0 ] && - [ $CleanInterval -eq 0 ]; then +if [ $UpdateInterval = always ] || + [ $DownloadUpgradeableInterval = always ] || + [ $UnattendedUpgradeInterval = always ] || + [ $BackupArchiveInterval = always ] || + [ $AutocleanInterval = always ] || + [ $CleanInterval = always ] ; then + : +elif [ $UpdateInterval -eq 0 ] && + [ $DownloadUpgradeableInterval -eq 0 ] && + [ $UnattendedUpgradeInterval -eq 0 ] && + [ $BackupArchiveInterval -eq 0 ] && + [ $AutocleanInterval -eq 0 ] && + [ $CleanInterval -eq 0 ] ; then # check cache size check_size_constraints -- cgit v1.2.3