Added --noconfirm to pacstrap and increased logging verbosity when packages fail, and adding a exception so that the installation doesn't continue silently. This causes too much confusion (even tho I liked the idea that people could recover the missing parts without having to re-run the installer for subsequent steps.

This commit is contained in:
Anton Hvornum 2021-09-13 14:55:09 +00:00
parent ea41a6c268
commit 168379d43d
1 changed files with 4 additions and 2 deletions

View File

@ -163,10 +163,12 @@ class Installer:
self.log(f'Installing packages: {packages}', level=logging.INFO)
if (sync_mirrors := SysCommand('/usr/bin/pacman -Syy')).exit_code == 0:
if (pacstrap := SysCommand(f'/usr/bin/pacstrap {self.target} {" ".join(packages)}', peak_output=True)).exit_code == 0:
if (pacstrap := SysCommand(f'/usr/bin/pacstrap --noconfirm {self.target} {" ".join(packages)}', peak_output=True)).exit_code == 0:
return True
else:
self.log(f'Could not strap in packages: {pacstrap.exit_code}', level=logging.INFO)
self.log(f'Could not strap in packages: {pacstrap}', level=logging.ERROR, fg="red")
self.log(f'Could not strap in packages: {pacstrap.exit_code}', level=logging.ERROR, fg="red")
raise RequirementError("Pacstrap failed. See /var/log/archinstall/install.log or above message for error details.")
else:
self.log(f'Could not sync mirrors: {sync_mirrors.exit_code}', level=logging.INFO)