From dc8242c8c7866963bd1bf6573a87f2eaf9ecb108 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 16 Apr 2026 22:33:21 +0200 Subject: [PATCH] Expand patch for python 3.14 issue with archinstall 4.2 --- configs/airootfs/root/.automated_script.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/configs/airootfs/root/.automated_script.sh b/configs/airootfs/root/.automated_script.sh index 6aa93a7..78c7751 100644 --- a/configs/airootfs/root/.automated_script.sh +++ b/configs/airootfs/root/.automated_script.sh @@ -80,10 +80,17 @@ install_base_system() { # Ensure that no mounts exist from past install attempts findmnt -R /mnt >/dev/null && umount -R /mnt - # Workaround for archinstall 4.2 regression in sync_log_to_install_medium: - # `self.target / absolute_logfile` drops self.target because the RHS is - # absolute, so Python 3.14 Path.copy() raises EINVAL (source == target). - sed -i 's|logfile_target = self\.target / absolute_logfile$|logfile_target = self.target / absolute_logfile.relative_to("/")|' \ + # Workarounds for archinstall 4.2 regressions under Python 3.14: + # 1. sync_log_to_install_medium: `self.target / absolute_logfile` drops + # self.target because the RHS is absolute, so Path.copy() raises EINVAL + # (source == target). + # 2. _add_limine_bootloader: `Path.copy(efi_dir_path)` raises IsADirectoryError + # because 3.14's Path.copy treats target as a literal path, not a directory + # (shutil.copy used to auto-append the source filename). + sed -i \ + -e 's|logfile_target = self\.target / absolute_logfile$|logfile_target = self.target / absolute_logfile.relative_to("/")|' \ + -e 's|(limine_path / file)\.copy(efi_dir_path)|(limine_path / file).copy(efi_dir_path / file)|' \ + -e "s|(limine_path / 'limine-bios.sys')\.copy(boot_limine_path)|(limine_path / 'limine-bios.sys').copy(boot_limine_path / 'limine-bios.sys')|" \ /usr/lib/python3.14/site-packages/archinstall/lib/installer.py # Install using files generated by the ./configurator