From 4d9fe835e705c0a1865abb78f4f06e14884f3f94 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 1 Oct 2021 12:33:22 +0200 Subject: [PATCH] Log when installing packages --- chroot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chroot.py b/chroot.py index 5e88b75..557823a 100644 --- a/chroot.py +++ b/chroot.py @@ -48,6 +48,8 @@ def create_chroot( with open(pacman_conf_target, 'w') as file: file.write(conf_text) + logging.info(f'Installing packages to {chroot_name}: {", ".join(packages)}') + result = subprocess.run([ 'pacstrap', '-C', @@ -59,11 +61,9 @@ def create_chroot( '--needed', '--overwrite=*', '-yyuu', - ], - capture_output=True) + ]) if result.returncode != 0: - logging.debug(result.stdout.decode()) - raise Exception(f'Failed to install chroot "{chroot_name}":' + '\n' + result.stderr.decode()) + raise Exception(f'Failed to install chroot "{chroot_name}"') return chroot_path