From 0cd088572d4c9a45711eb7a358cb4c2edd98e450 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 22 Jul 2020 01:03:14 +0000 Subject: New feature: application profiles now support .py as well. Also fixed a sys.path issue where an installed version of archinstall would have precedence over the local version when profiles were being executed (because profiles were living in a unknown relative working directory, the caller to those profiles have to make sure .archinstall exists in sys.path before calling said profile) --- archinstall/lib/installer.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'archinstall/lib/installer.py') diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 90849bf2..9247c635 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -91,6 +91,12 @@ class Installer(): o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.mountpoint} ln -s /usr/share/zoneinfo/{zone} /etc/localtime')) return True + def run_command(self, cmd): + return sys_command(f'/usr/bin/arch-chroot {self.mountpoint} {cmd}') + + def arch_chroot(self, cmd): + return self.run_command(cmd) + def minimal_installation(self): self.pacstrap('base base-devel linux linux-firmware btrfs-progs efibootmgr nano'.split(' ')) self.genfstab() @@ -158,13 +164,13 @@ class Installer(): raise RequirementError(f'Could not identify the UUID of {self.partition}, there for {self.mountpoint}/boot/loader/entries/arch.conf will be broken until fixed.') def add_additional_packages(self, *packages): - self.pacstrap(*packages) + return self.pacstrap(*packages) def install_profile(self, profile): profile = Profile(self, profile) log(f'Installing network profile {profile}') - profile.install() + return profile.install() def user_create(self, user :str, password=None, groups=[]): log(f'Creating user {user}') -- cgit v1.2.3-70-g09d2