From 76ad2bfddc8c9c1d869dd3cc8d9107f577f6aefe Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Mon, 28 Feb 2022 15:04:00 -0300 Subject: [PATCH] [arch] fix: install simulation actually installs the package when password is blank --- bauh/gems/arch/controller.py | 2 +- bauh/gems/arch/pacman.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bauh/gems/arch/controller.py b/bauh/gems/arch/controller.py index 06939bc0..7dd1328b 100644 --- a/bauh/gems/arch/controller.py +++ b/bauh/gems/arch/controller.py @@ -2315,7 +2315,7 @@ class ArchManager(SoftwareManager): self.logger.info("Checking for possible conflicts with '{}'".format(context.name)) _, output = context.handler.handle_simple(pacman.install_as_process(pkgpaths=pkgpaths, - root_password=context.root_password, + root_password=None, pkgdir=context.project_dir or '.', file=bool(context.install_files), simulate=True), diff --git a/bauh/gems/arch/pacman.py b/bauh/gems/arch/pacman.py index 2fd00874..0f4ced85 100644 --- a/bauh/gems/arch/pacman.py +++ b/bauh/gems/arch/pacman.py @@ -162,7 +162,7 @@ def install_as_process(pkgpaths: Iterable[str], root_password: Optional[str], fi cmd.append('--asdeps') return SimpleProcess(cmd=cmd, - root_password=root_password, + root_password=None if simulate else root_password, cwd=pkgdir, error_phrases={"error: failed to prepare transaction", 'error: failed to commit transaction', 'error: target not found'}, shell=True)