From a3d9ad9f3f48c9bd06edb6c1ec58b55ac4bb6741 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Tue, 26 Jan 2021 00:11:17 +0100 Subject: Corrected a error in the installation of iwd. The package was added to base_packages, which is never installed if the installer has already finished installing the base packages before this function was called. copy_ISO_network_config() there for now properly checks if the installation is complete and if so, simply straps in the package. Otherwise adds it to the base packages and waits for the base to roll through. --- archinstall/lib/installer.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index c8cf40d0..e1a37f32 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -190,20 +190,24 @@ class Installer(): if not os.path.isdir(f"{self.mountpoint}/var/lib/iwd"): os.makedirs(f"{self.mountpoint}/var/lib/iwd") - self.base_packages.append('iwd') - - if enable_services and self.helper_flags.get('base', False) is False: - # This function will be called after minimal_installation() - # as a hook for post-installs. This hook is only needed if - # base is not installed yet. - def post_install_enable_iwd_service(*args, **kwargs): + if enable_services: + # If we haven't installed the base yet (function called pre-maturely) + if self.helper_flags.get('base', False) is False: + self.base_packages.append('iwd') + # This function will be called after minimal_installation() + # as a hook for post-installs. This hook is only needed if + # base is not installed yet. + def post_install_enable_iwd_service(*args, **kwargs): + self.enable_service('iwd') + + self.post_base_install.append(post_install_enable_iwd_service) + # Otherwise, we can go ahead and add the required package + # and enable it's service: + else: + self.pacstrap(self.base_packages) self.enable_service('iwd') - self.post_base_install.append(post_install_enable_iwd_service) - elif enable_services and self.helper_flags.get('base', False) is True: - self.enable_service('iwd') - for psk in psk_files: shutil.copy2(psk, f"{self.mountpoint}/var/lib/iwd/{os.path.basename(psk)}") -- cgit v1.2.3-70-g09d2