diff options
author | Julian Andres Klode <jak@debian.org> | 2017-06-01 09:16:37 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2017-06-01 09:16:37 +0200 |
commit | cedf80c55766868eadc7ed59a27537c9a5d91edf (patch) | |
tree | 15020fdb40c3013f5f05f75c061c891d57200028 /debian | |
parent | 31c81a37ac6dceda0c94ce088b338b6b09afd5a4 (diff) |
apt.systemd.daily: Use unattend-ugrade --download-only if available
Using dry-run as in the previous commit is not really correct, as
it logs dpkg debugging output too. So, let's assume unattended-upgrade
gets a --download-only option and use that if it is available.
This lets us add the downloading part to unattended-upgrades later
on, without requiring versioned dependencies between the two.
Closes: #863859
Diffstat (limited to 'debian')
-rwxr-xr-x | debian/apt.systemd.daily | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/debian/apt.systemd.daily b/debian/apt.systemd.daily index 544145077..49af931bd 100755 --- a/debian/apt.systemd.daily +++ b/debian/apt.systemd.daily @@ -452,8 +452,8 @@ if [ "$1" = "update" -o -z "$1" ] ; then debug_echo "download upgradable (not run)" fi - if which unattended-upgrade >/dev/null 2>&1 && check_stamp $DOWNLOAD_UPGRADEABLE_STAMP $UnattendedUpgradeInterval; then - if unattended-upgrade --dry-run $XUUPOPT; then + if which unattended-upgrade >/dev/null 2>&1 && unattended-upgrade --help | grep -q download-only && check_stamp $DOWNLOAD_UPGRADEABLE_STAMP $UnattendedUpgradeInterval; then + if unattended-upgrade --download-only $XUUPOPT; then update_stamp $DOWNLOAD_UPGRADEABLE_STAMP debug_echo "unattended-upgrade -d (success)" else |