Comment 5 for bug 1686470

Revision history for this message
Julian Andres Klode (juliank) wrote : Re: Apt updates that are uniformally spread across all timezones, with predictable application windows

Hmm, seems I forgot to change the downloading to run when unattended-upgrades is configured. But this seems like a bad choice anyway with the current implementation.

Maybe let's do something like

    if which unattended-upgrade >/dev/null 2>&1 && check_stamp $DOWNLOAD_UPGRADEABLE_STAMP $UnattendedUpgradeInterval; then
 if unattended-upgrade -d $XUUPOPT; then
     update_stamp $UPGRADE_STAMP
     debug_echo "unattended-upgrade -d (success)"
 else
     debug_echo "unattended-upgrade -d (error)"
 fi
    else
 debug_echo "unattended-upgrade -d (not run)"
    fi

That is, don't download the upgrades with apt -d dist-upgrade, use unattended-upgrade -d. This uses the same stamp file as the current list-upgrade option, but compares it against the unattended-upgrades section, and contains the unattended-upgrade body, with -d appended.