mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
upgrades: Check apt result during dist-upgrade
In case apt full-upgrade fails for any reason, do not continue. Otherwise, may get stuck unattended-upgrade later (#2266). Since the dist-upgrade flag remains set, Plinth should retry the dist-upgrade later. Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
e25468c07d
commit
c64e6e7723
@ -518,7 +518,13 @@ def _perform_dist_upgrade():
|
||||
', '.join(DIST_UPGRADE_PACKAGES_WITH_PROMPTS) + '...', flush=True)
|
||||
with apt_hold(DIST_UPGRADE_PACKAGES_WITH_PROMPTS):
|
||||
print('Running apt full-upgrade...', flush=True)
|
||||
run_apt_command(['full-upgrade'])
|
||||
returncode = run_apt_command(['full-upgrade'])
|
||||
|
||||
# Check if apt upgrade was successful.
|
||||
if returncode:
|
||||
raise RuntimeError(
|
||||
'Apt full-upgrade was not successful. Distribution upgrade '
|
||||
'will be retried at a later time.')
|
||||
|
||||
_update_searx(reenable_searx)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user