updated to lastest commit, fixed a conflict
This commit is contained in:
commit
85e4a85cdb
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in New Issue