Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
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
parent1188303fb3415c6ef428b312453afa8edf4d5a4d (diff)
parent638985f17dfe1934a08b707687a29170bc1dd49c (diff)
updated to lastest commit, fixed a conflict
-rw-r--r--archinstall/lib/user_interaction.py28
-rw-r--r--examples/guided.py7
-rw-r--r--profiles/applications/lxqt.py2
3 files changed, 23 insertions, 14 deletions
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
index 83c5e5cd..bd9d432d 100644
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -132,17 +132,18 @@ def ask_for_additional_users(prompt='Any additional users to install (leave blan
return users, super_users
def ask_for_a_timezone():
- timezone = input('Enter a valid timezone (examples: Europe/Stockholm, US/Eastern) or press enter to use UTC: ').strip()
- if timezone == '':
- timezone = 'UTC'
- if (pathlib.Path("/usr")/"share"/"zoneinfo"/timezone).exists():
- return timezone
- else:
- log(
- f"Time zone {timezone} does not exist, continuing with system default.",
- level=LOG_LEVELS.Warning,
- fg='red'
- )
+ while True:
+ timezone = input('Enter a valid timezone (examples: Europe/Stockholm, US/Eastern) or press enter to use UTC: ').strip().strip('*.')
+ if timezone == '':
+ timezone = 'UTC'
+ if (pathlib.Path("/usr")/"share"/"zoneinfo"/timezone).exists():
+ return timezone
+ else:
+ log(
+ f"Specified timezone {timezone} does not exist.",
+ level=LOG_LEVELS.Warning,
+ fg='red'
+ )
def ask_for_bootloader() -> str:
bootloader = "systemd-bootctl"
@@ -331,10 +332,13 @@ def select_disk(dict_o_disks):
if len(drives) >= 1:
for index, drive in enumerate(drives):
print(f"{index}: {drive} ({dict_o_disks[drive]['size'], dict_o_disks[drive].device, dict_o_disks[drive]['label']})")
- drive = generic_select(drives, 'Select one of the above disks (by number or full path) or leave blank to skip partitioning: ',
+
+ log(f"You can skip selecting a drive and partition it and use whatever drive-setup is mounted at /mnt (experimental)", fg="yellow")
+ drive = generic_select(drives, 'Select one of the above disks (by name or number) or leave blank to use /mnt: ',
options_output=False)
if not drive:
return drive
+
drive = dict_o_disks[drive]
return drive
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:
diff --git a/profiles/applications/lxqt.py b/profiles/applications/lxqt.py
index 5ce875cc..2099f3fa 100644
--- a/profiles/applications/lxqt.py
+++ b/profiles/applications/lxqt.py
@@ -1,3 +1,3 @@
import archinstall
-installation.add_additional_packages("lxqt breeze-icons oxygen-icons xdg-utils ttf-freefont leafpad slock archlinux-wallpaper sddm")
+installation.add_additional_packages("lxqt breeze-icons oxygen-icons xdg-utils ttf-freefont leafpad slock sddm")