diff options
author | Paul Wise <pabs@debian.org> | 2017-07-13 07:30:25 +1000 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2017-07-12 23:59:35 +0200 |
commit | 0f3f9e620e9b977ff72bbcbcc205a1e60ed5b836 (patch) | |
tree | 6c92c73837c948c4f25da5551112e0c44c183706 /debian/apt.systemd.daily | |
parent | 1d9e29c9e2a5591b42a99a721b901fc003ed9149 (diff) |
Fix some more crashes when APT::Periodic options are set to always
Gbp-Dch: ignore
Diffstat (limited to 'debian/apt.systemd.daily')
-rwxr-xr-x | debian/apt.systemd.daily | 23 |
1 files 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 |