Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk/helpers.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-11-23 11:37:51 +0000
committerGitHub <noreply@github.com>2021-11-23 11:37:51 +0000
commit6b6c9c84bed1e4640f5f46282da1767827f977a9 (patch)
tree9a6750bd296e18cb36189ea06808524c1619d4e8 /archinstall/lib/disk/helpers.py
parente15697119116487f84e72a22e99f8e46d714f21f (diff)
Adding a warning when /boot is reasonably too small (#738)
* Moved convert_size_to_gb() into disk/helpers.py, Added a Partition().size property meta function. Using the .size value to check if /boot is too small which will raise an exception. The only drawback is that it's done post-formatting. This in order to catch scenarios where formatting isn't used. * Changed /boot warning from 0.15GB to 0.25GB * Changed the wording in the warning when /boot is too small.
Diffstat (limited to 'archinstall/lib/disk/helpers.py')
-rw-r--r--archinstall/lib/disk/helpers.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/archinstall/lib/disk/helpers.py b/archinstall/lib/disk/helpers.py
index fea9ef65..46d86bd5 100644
--- a/archinstall/lib/disk/helpers.py
+++ b/archinstall/lib/disk/helpers.py
@@ -10,6 +10,10 @@ from ..general import SysCommand
from ..output import log
ROOT_DIR_PATTERN = re.compile('^.*?/devices')
+GIGA = 2 ** 30
+
+def convert_size_to_gb(size):
+ return round(size / GIGA,1)
def sort_block_devices_based_on_performance(block_devices):
result = {device: 0 for device in block_devices}