mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
upgrades: Only check free space bytes before dist upgrade
Remove the percentage check, which was incorrectly checking used percent, not free percent. Closes: #2046. Tests: - Fill up disk space so that 4.5G is free. Dist upgrade does not start due to not enough free space. - Fill up disk space so that 5.5G is free. Dist upgrade can be started. Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
2 files changed
+6
-8
No files matched your search
@@ -209,11 +209,10 @@ def check_dist_upgrade(_):
|
||||
logger.warning('Skip dist upgrade: Not enough free space in /.')
|
||||
title = ugettext_noop('Could not start distribution update')
|
||||
message = ugettext_noop(
|
||||
# xgettext:no-python-format
|
||||
'There is not enough free space in the root partition to '
|
||||
'start the distribution update. Please ensure at least 5 GB, '
|
||||
'and at least 10% of the total space, is free. Distribution '
|
||||
'update will be retried after 24 hours, if enabled.')
|
||||
'start the distribution update. Please ensure at least 5 GB '
|
||||
'is free. Distribution update will be retried after 24 hours,'
|
||||
' if enabled.')
|
||||
Notification.update_or_create(
|
||||
id='upgrades-dist-upgrade-free-space', app_id='upgrades',
|
||||
severity='warning', title=title, message=message, actions=[{
|
||||
|
||||
Reference in new issue
Block a user