mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-13 10:30:16 +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
e3c285c4cb
commit
99dfe9fe1e
@ -518,7 +518,13 @@ def _perform_dist_upgrade():
|
|||||||
', '.join(DIST_UPGRADE_PACKAGES_WITH_PROMPTS) + '...', flush=True)
|
', '.join(DIST_UPGRADE_PACKAGES_WITH_PROMPTS) + '...', flush=True)
|
||||||
with apt_hold(DIST_UPGRADE_PACKAGES_WITH_PROMPTS):
|
with apt_hold(DIST_UPGRADE_PACKAGES_WITH_PROMPTS):
|
||||||
print('Running apt full-upgrade...', flush=True)
|
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)
|
_update_searx(reenable_searx)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user