mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-06-10 11:00:22 +00:00
upgrades: Perform easier checks first during dist upgrade
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
0022dc5889
commit
8c93ea20a4
@ -93,6 +93,12 @@ def check(test_upgrade=False):
|
||||
Return (boolean, string) indicating if the upgrade is ready, and a reason
|
||||
if not.
|
||||
"""
|
||||
if not utils.check_auto():
|
||||
raise RuntimeError('upgrades-not-enabled')
|
||||
|
||||
if not utils.is_sufficient_free_space():
|
||||
raise RuntimeError('not-enough-free-space')
|
||||
|
||||
if action_utils.service_is_running('freedombox-dist-upgrade'):
|
||||
raise RuntimeError('found-previous')
|
||||
|
||||
@ -108,12 +114,6 @@ def check(test_upgrade=False):
|
||||
if codename == dist:
|
||||
raise RuntimeError(f'already-{dist}')
|
||||
|
||||
if not utils.check_auto():
|
||||
raise RuntimeError('upgrades-not-enabled')
|
||||
|
||||
if not utils.is_sufficient_free_space():
|
||||
raise RuntimeError('not-enough-free-space')
|
||||
|
||||
_sources_list_update(dist, codename)
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user