Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples/guided.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-04-22 21:56:52 +0200
committerAnton Hvornum <anton@hvornum.se>2021-04-22 21:56:52 +0200
commit81c57560b3f2f0cd10dd8d6b360266f9f4622a41 (patch)
treef06a6e09028c3f37bee93db3b4876196c2a47b0a /examples/guided.py
parentc88034fa8a76b4bff4f626b5467767457d6fef62 (diff)
Fixes #324.
Diffstat (limited to 'examples/guided.py')
-rw-r--r--examples/guided.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/guided.py b/examples/guided.py
index ef447abb..09638f0e 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -74,13 +74,14 @@ def ask_user_questions():
archinstall.log(f" ** You will now select which partitions to use by selecting mount points (inside the installation). **")
archinstall.log(f" ** The root would be a simple / and the boot partition /boot (as all paths are relative inside the installation). **")
+ mountpoints_set = []
while True:
# Select a partition
# If we provide keys as options, it's better to convert them to list and sort before passing
mountpoints_list = sorted(list(partition_mountpoints.keys()))
partition = archinstall.generic_select(mountpoints_list,
"Select a partition by number that you want to set a mount-point for (leave blank when done): ")
- if not partition:
+ if not partition and set(mountpoints_set) & {'/', '/boot'} == {'/', '/boot'}:
break
# Select a mount-point
@@ -122,6 +123,7 @@ def ask_user_questions():
# We can safely mark the partition for formatting and where to mount it.
# TODO: allow_formatting might be redundant since target_mountpoint should only be
# set if we actually want to format it anyway.
+ mountpoints_set.append(mountpoint)
partition.allow_formatting = True
partition.target_mountpoint = mountpoint
# Only overwrite the filesystem definition if we selected one: