- Fix KeyError exceptions (#1354)
This commit is contained in:
parent
cfea0d6d1a
commit
956b34905b
|
|
@ -631,7 +631,7 @@ class Installer:
|
|||
mkinit.write(f"BINARIES=({' '.join(self.BINARIES)})\n")
|
||||
mkinit.write(f"FILES=({' '.join(self.FILES)})\n")
|
||||
|
||||
if not storage['arguments']['HSM']:
|
||||
if not storage['arguments'].get('HSM'):
|
||||
# For now, if we don't use HSM we revert to the old
|
||||
# way of setting up encryption hooks for mkinitcpio.
|
||||
# This is purely for stability reasons, we're going away from this.
|
||||
|
|
@ -673,7 +673,7 @@ class Installer:
|
|||
self.HOOKS.remove('fsck')
|
||||
|
||||
if self.detect_encryption(partition):
|
||||
if storage['arguments']['HSM']:
|
||||
if storage['arguments'].get('HSM'):
|
||||
# Required bby mkinitcpio to add support for fido2-device options
|
||||
self.pacstrap('libfido2')
|
||||
|
||||
|
|
@ -737,7 +737,7 @@ class Installer:
|
|||
# TODO: Use python functions for this
|
||||
SysCommand(f'/usr/bin/arch-chroot {self.target} chmod 700 /root')
|
||||
|
||||
if storage['arguments']['HSM']:
|
||||
if storage['arguments'].get('HSM'):
|
||||
# TODO:
|
||||
# A bit of a hack, but we need to get vconsole.conf in there
|
||||
# before running `mkinitcpio` because it expects it in HSM mode.
|
||||
|
|
@ -865,7 +865,7 @@ class Installer:
|
|||
|
||||
kernel_options = f"options"
|
||||
|
||||
if storage['arguments']['HSM']:
|
||||
if storage['arguments'].get('HSM'):
|
||||
# Note: lsblk UUID must be used, not PARTUUID for sd-encrypt to work
|
||||
kernel_options += f" rd.luks.name={real_device.uuid}=luksdev"
|
||||
# Note: tpm2-device and fido2-device don't play along very well:
|
||||
|
|
|
|||
|
|
@ -187,11 +187,12 @@ def perform_installation(mountpoint):
|
|||
if installation.minimal_installation(testing=enable_testing, multilib=enable_multilib):
|
||||
installation.set_locale(archinstall.arguments['sys-language'], archinstall.arguments['sys-encoding'].upper())
|
||||
installation.set_hostname(archinstall.arguments['hostname'])
|
||||
if archinstall.arguments['mirror-region'].get("mirrors", None) is not None:
|
||||
installation.set_mirrors(archinstall.arguments['mirror-region']) # Set the mirrors in the installation medium
|
||||
if archinstall.arguments['swap']:
|
||||
if archinstall.arguments.get('mirror-region') is not None:
|
||||
if archinstall.arguments.get("mirrors", None) is not None:
|
||||
installation.set_mirrors(archinstall.arguments['mirror-region']) # Set the mirrors in the installation medium
|
||||
if archinstall.arguments.get('swap'):
|
||||
installation.setup_swap('zram')
|
||||
if archinstall.arguments["bootloader"] == "grub-install" and archinstall.has_uefi():
|
||||
if archinstall.arguments.get("bootloader") == "grub-install" and archinstall.has_uefi():
|
||||
installation.add_additional_packages("grub")
|
||||
installation.add_bootloader(archinstall.arguments["bootloader"])
|
||||
|
||||
|
|
@ -274,7 +275,7 @@ if not (archinstall.check_mirror_reachable() or archinstall.arguments.get('skip-
|
|||
archinstall.log(f"Arch Linux mirrors are not reachable. Please check your internet connection and the log file '{log_file}'.", level=logging.INFO, fg="red")
|
||||
exit(1)
|
||||
|
||||
if not archinstall.arguments['offline']:
|
||||
if not archinstall.arguments.get('offline'):
|
||||
latest_version_archlinux_keyring = max([k.pkg_version for k in archinstall.find_package('archlinux-keyring')])
|
||||
|
||||
# If we want to check for keyring updates
|
||||
|
|
|
|||
Loading…
Reference in New Issue