From cedf80c55766868eadc7ed59a27537c9a5d91edf Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 1 Jun 2017 09:16:37 +0200 Subject: 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 --- debian/apt.systemd.daily | 4 ++-- 1 file 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 -- cgit v1.2.3