Removing hardcoded btrfs for suggested partition layouts.
This commit is contained in:
parent
ad534f0804
commit
f6ceb8bba6
|
|
@ -110,7 +110,11 @@ def select_disk_larger_than_or_close_to(devices, gigabytes, filter_out=None):
|
||||||
|
|
||||||
return min(copy_devices, key=(lambda device : abs(device.size - gigabytes)))
|
return min(copy_devices, key=(lambda device : abs(device.size - gigabytes)))
|
||||||
|
|
||||||
def suggest_single_disk_layout(block_device):
|
def suggest_single_disk_layout(block_device, default_filesystem=None):
|
||||||
|
if not default_filesystem:
|
||||||
|
from .user_interaction import ask_for_main_filesystem_format
|
||||||
|
default_filesystem = ask_for_main_filesystem_format()
|
||||||
|
|
||||||
MIN_SIZE_TO_ALLOW_HOME_PART = 40 # Gb
|
MIN_SIZE_TO_ALLOW_HOME_PART = 40 # Gb
|
||||||
|
|
||||||
layout = {
|
layout = {
|
||||||
|
|
@ -142,7 +146,7 @@ def suggest_single_disk_layout(block_device):
|
||||||
"size" : "100%" if block_device.size < MIN_SIZE_TO_ALLOW_HOME_PART else f"{min(block_device.size, 20)*1024}MiB",
|
"size" : "100%" if block_device.size < MIN_SIZE_TO_ALLOW_HOME_PART else f"{min(block_device.size, 20)*1024}MiB",
|
||||||
"mountpoint" : "/",
|
"mountpoint" : "/",
|
||||||
"filesystem" : {
|
"filesystem" : {
|
||||||
"format" : "btrfs"
|
"format" : default_filesystem
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -156,14 +160,18 @@ def suggest_single_disk_layout(block_device):
|
||||||
"size" : "100%",
|
"size" : "100%",
|
||||||
"mountpoint" : "/home",
|
"mountpoint" : "/home",
|
||||||
"filesystem" : {
|
"filesystem" : {
|
||||||
"format" : "btrfs"
|
"format" : default_filesystem
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
return layout
|
return layout
|
||||||
|
|
||||||
|
|
||||||
def suggest_multi_disk_layout(block_devices):
|
def suggest_multi_disk_layout(block_devices, default_filesystem=None):
|
||||||
|
if not default_filesystem:
|
||||||
|
from .user_interaction import ask_for_main_filesystem_format
|
||||||
|
default_filesystem = ask_for_main_filesystem_format()
|
||||||
|
|
||||||
MIN_SIZE_TO_ALLOW_HOME_PART = 40 # Gb
|
MIN_SIZE_TO_ALLOW_HOME_PART = 40 # Gb
|
||||||
ARCH_LINUX_INSTALLED_SIZE = 20 # Gb, rough estimate taking in to account user desktops etc. TODO: Catch user packages to detect size?
|
ARCH_LINUX_INSTALLED_SIZE = 20 # Gb, rough estimate taking in to account user desktops etc. TODO: Catch user packages to detect size?
|
||||||
|
|
||||||
|
|
@ -207,7 +215,7 @@ def suggest_multi_disk_layout(block_devices):
|
||||||
"size" : "100%",
|
"size" : "100%",
|
||||||
"mountpoint" : "/",
|
"mountpoint" : "/",
|
||||||
"filesystem" : {
|
"filesystem" : {
|
||||||
"format" : "btrfs"
|
"format" : default_filesystem
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -220,7 +228,7 @@ def suggest_multi_disk_layout(block_devices):
|
||||||
"size" : "100%",
|
"size" : "100%",
|
||||||
"mountpoint" : "/home",
|
"mountpoint" : "/home",
|
||||||
"filesystem" : {
|
"filesystem" : {
|
||||||
"format" : "btrfs"
|
"format" : default_filesystem
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue