From 5544eff7075a2bbd87243dee334d13d1a5ba8166 Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Wed, 5 Feb 2025 17:16:17 -0500 Subject: [PATCH] upgrades: Drop unattended-upgrade call from dist-upgrade unattended-upgrade will take a very long time to run, and won't be able to upgrade most of the packages. There is not much benefit to running it here. Signed-off-by: James Valleroy Reviewed-by: Sunil Mohan Adapa --- plinth/modules/upgrades/privileged.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/plinth/modules/upgrades/privileged.py b/plinth/modules/upgrades/privileged.py index e0e2cd140..46bb37c2f 100644 --- a/plinth/modules/upgrades/privileged.py +++ b/plinth/modules/upgrades/privileged.py @@ -60,8 +60,6 @@ DIST_UPGRADE_PACKAGES_WITH_PROMPTS = [ 'mumble-server', 'radicale', 'roundcube-core', 'tt-rss' ] -DIST_UPGRADE_PRE_INSTALL_PACKAGES = ['base-files'] - DIST_UPGRADE_PRE_DEBCONF_SELECTIONS: list[str] = [ # Tell grub-pc to continue without installing grub again. 'grub-pc grub-pc/install_devices_empty boolean true' @@ -479,12 +477,6 @@ def _perform_dist_upgrade(): print('Updating Apt cache...', flush=True) run_apt_command(['update']) - # Install packages that are necessary for unattended-upgrades - # to start the dist upgrade. - print(f'Upgrading packages: {DIST_UPGRADE_PRE_INSTALL_PACKAGES}...', - flush=True) - run_apt_command(['install'] + DIST_UPGRADE_PRE_INSTALL_PACKAGES) - # Pre-set debconf selections if they are required during the # dist upgrade. if DIST_UPGRADE_PRE_DEBCONF_SELECTIONS: @@ -493,13 +485,6 @@ def _perform_dist_upgrade(): f'{DIST_UPGRADE_PRE_DEBCONF_SELECTIONS}', flush=True) debconf_set_selections(DIST_UPGRADE_PRE_DEBCONF_SELECTIONS) - # This will upgrade most of the packages. - # Previously, when dist-upgrading from bullseye to bookworm, there was - # an issue where unattended-upgrade gets stuck. See #2266. However, it - # does not get stuck when dist-upgrading from bookworm to trixie. - print('Running unattended-upgrade...', flush=True) - subprocess.run(['unattended-upgrade', '--verbose'], check=False) - # Remove obsolete packages that may prevent other packages from # upgrading. if DIST_UPGRADE_OBSOLETE_PACKAGES: