Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/disk/helpers.py7
-rw-r--r--archinstall/lib/menu/global_menu.py17
-rw-r--r--archinstall/lib/user_interaction/partitioning_conf.py2
3 files changed, 13 insertions, 13 deletions
diff --git a/archinstall/lib/disk/helpers.py b/archinstall/lib/disk/helpers.py
index 99856aad..65d7a006 100644
--- a/archinstall/lib/disk/helpers.py
+++ b/archinstall/lib/disk/helpers.py
@@ -433,9 +433,10 @@ def disk_layouts() -> Optional[Dict[str, Any]]:
def encrypted_partitions(blockdevices :Dict[str, Any]) -> bool:
- for partition in blockdevices.values():
- if partition.get('encrypted', False):
- yield partition
+ for blockdevice in blockdevices.values():
+ for partition in blockdevice.get('partitions', []):
+ if partition.get('encrypted', False):
+ yield partition
def find_partition_by_mountpoint(block_devices :List[BlockDevice], relative_mountpoint :str) -> Partition:
for device in block_devices:
diff --git a/archinstall/lib/menu/global_menu.py b/archinstall/lib/menu/global_menu.py
index 5cb27cab..3ffb6f15 100644
--- a/archinstall/lib/menu/global_menu.py
+++ b/archinstall/lib/menu/global_menu.py
@@ -204,14 +204,15 @@ class GlobalMenu(GeneralMenu):
# Then we need to identify which partitions to encrypt. This will default to / (root).
if len(list(encrypted_partitions(storage['arguments'].get('disk_layouts', [])))) == 0:
for blockdevice in storage['arguments']['disk_layouts']:
- for partition_index in select_encrypted_partitions(
- title="Select which partitions to encrypt:",
- partitions=storage['arguments']['disk_layouts'][blockdevice]['partitions']
- ):
-
- partition = storage['arguments']['disk_layouts'][blockdevice]['partitions'][partition_index]
- partition['encrypted'] = True
- partition['!password'] = storage['arguments']['!encryption-password']
+ if storage['arguments']['disk_layouts'][blockdevice].get('partitions'):
+ for partition_index in select_encrypted_partitions(
+ title="Select which partitions to encrypt:",
+ partitions=storage['arguments']['disk_layouts'][blockdevice]['partitions']
+ ):
+
+ partition = storage['arguments']['disk_layouts'][blockdevice]['partitions'][partition_index]
+ partition['encrypted'] = True
+ partition['!password'] = storage['arguments']['!encryption-password']
def _install_text(self):
missing = len(self._missing_configs())
diff --git a/archinstall/lib/user_interaction/partitioning_conf.py b/archinstall/lib/user_interaction/partitioning_conf.py
index bfff5705..1f41f9b0 100644
--- a/archinstall/lib/user_interaction/partitioning_conf.py
+++ b/archinstall/lib/user_interaction/partitioning_conf.py
@@ -374,8 +374,6 @@ def select_encrypted_partitions(
if len(partition_indexes) == 0:
return None
- title = _('Select which partitions to mark for formatting:')
-
# show current partition layout:
if len(partitions):
title += current_partition_layout(partitions) + '\n'