From eaab1334258f9c3813fba68b806f0ef4d14e1bc7 Mon Sep 17 00:00:00 2001 From: Adam Spragg Date: Thu, 17 Mar 2022 09:47:36 +0000 Subject: Disable `apt-listbugs` during upgrades Because if the network isn't available, it causes an abort. More details in the README.md --- README.md | 27 +++++++++++++++++++++++++++ adu-upgrade | 4 ++++ 2 files changed, 31 insertions(+) diff --git a/README.md b/README.md index 5b9ece9..626f28c 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,33 @@ then applying those upgrades on reboot via the [systemd Offline Updates][] functionality. +## TODO + +### apt-listbugs + +We disable `apt-listbugs` during upgrades, because desktop systems typically use +`NetworkManager`, which is not started by default for `offline-updates.target`. +And if `apt-listbugs` can't reach the network, it aborts the upgrade. + +We could try pulling in the network during upgrades, just in case `apt-listbugs` +is installed. But that kind of defeats the purpose of "offline updates". Also, +it's redundant if `apt-listbugs` isn't installed. And given that this package's +target audience is mainly systems that are *not* individually managed by +attentive sysadmins, but are as much as possible fire-and-forget, "stable"/LTS +systems for users who aren't necessarily in a position to make a decision on +whether a bug will affect their workflow, the intersection of those systems with +`apt-desktop-upgrades` installed, and those with `apt-listbugs` installed, is +probably pretty small. + +However... + +It would be nice if it were possible somehow to hook `apt-listbugs` (if it's +installed) into the `adu-download` phase of things, and just not download +updates for packages which have bugs (or remove already-downloaded updates). + +So, look into a way of doing that. + + ## License Copyright © 2022 Adam Spragg diff --git a/adu-upgrade b/adu-upgrade index bdc1efc..e0a25dd 100755 --- a/adu-upgrade +++ b/adu-upgrade @@ -41,6 +41,10 @@ if [ "$upgrades" -eq 0 ]; then exit 0 fi +# Disable apt-listbugs, because if the network isn't available then it blocks +# upgrades. +export APT_LISTBUGS_FRONTEND=none + # Do the update export DEBIAN_FRONTEND=noninteractive apt-get -q -y --with-new-pkgs --no-download --ignore-missing upgrade -- cgit v1.2.1