Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/user_interaction.py
diff options
context:
space:
mode:
authorDylan M. Taylor <dylan@dylanmtaylor.com>2021-11-22 15:08:41 -0500
committerGitHub <noreply@github.com>2021-11-22 21:08:41 +0100
commite532b7615813e72fe576c20eaf4cd988e9ef8729 (patch)
tree80af0c3add14876da11fda01355cb6bc69b0bcc9 /archinstall/lib/user_interaction.py
parent0c96ae049dd188c0df247c29ea36715e92428d3a (diff)
Make NTFS an advanced option (#753)
* Make NTFS an advanced option
Diffstat (limited to 'archinstall/lib/user_interaction.py')
-rw-r--r--archinstall/lib/user_interaction.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
index 82113ba0..844f40a4 100644
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -481,15 +481,21 @@ def ask_for_disk_layout():
return next((key for key, val in options.items() if val == value), None)
-def ask_for_main_filesystem_format():
+def ask_for_main_filesystem_format(advanced_options=False):
options = {
'btrfs': 'btrfs',
'ext4': 'ext4',
'xfs': 'xfs',
- 'f2fs': 'f2fs',
+ 'f2fs': 'f2fs'
+ }
+
+ advanced = {
'ntfs': 'ntfs'
}
+ if advanced_options:
+ options.update(advanced)
+
value = generic_select(options, "Select which filesystem your main partition should use (by number or name): ", allow_empty_input=False)
return next((key for key, val in options.items() if val == value), None)
@@ -562,11 +568,11 @@ def partition_overlap(partitions :list, start :str, end :str) -> bool:
# TODO: Implement sanity check
return False
-def get_default_partition_layout(block_devices):
+def get_default_partition_layout(block_devices, advanced_options=False):
if len(block_devices) == 1:
- return suggest_single_disk_layout(block_devices[0])
+ return suggest_single_disk_layout(block_devices[0], advanced_options=advanced_options)
else:
- return suggest_multi_disk_layout(block_devices)
+ return suggest_multi_disk_layout(block_devices, advanced_options=advanced_options)
# TODO: Implement sane generic layout for 2+ drives
@@ -762,7 +768,7 @@ def select_individual_blockdevice_usage(block_devices :list):
return result
-def select_disk_layout(block_devices :list):
+def select_disk_layout(block_devices :list, advanced_options=False):
modes = [
"Wipe all selected drives and use a best-effort default partition layout",
"Select what to do with each individual drive (followed by partition usage)"
@@ -771,7 +777,7 @@ def select_disk_layout(block_devices :list):
mode = generic_select(modes, input_text=f"Select what you wish to do with the selected block devices: ")
if mode == 'Wipe all selected drives and use a best-effort default partition layout':
- return get_default_partition_layout(block_devices)
+ return get_default_partition_layout(block_devices, advanced_options)
else:
return select_individual_blockdevice_usage(block_devices)