Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authoradvaithm <advaith.madhukar@gmail.com>2021-04-24 13:56:35 +0530
committeradvaithm <advaith.madhukar@gmail.com>2021-04-24 13:56:35 +0530
commit85e4a85cdb1cebbf4fb8c9ad59c7531e6be06ed5 (patch)
treef10eb50d88b7dd11b1df5249d95ec760332943d0 /examples
parent1188303fb3415c6ef428b312453afa8edf4d5a4d (diff)
parent638985f17dfe1934a08b707687a29170bc1dd49c (diff)
updated to lastest commit, fixed a conflict
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 8e078f2a..d5b3c41a 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -75,6 +75,7 @@ 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
@@ -82,7 +83,10 @@ def ask_user_questions():
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:
- break
+ if set(mountpoints_set) & {'/', '/boot'} == {'/', '/boot'}:
+ break
+
+ continue
# Select a mount-point
mountpoint = input(f"Enter a mount-point for {partition}: ").strip(' ')
@@ -123,6 +127,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: