[arch] improvement -> AUR: new settings property 'aur_build_only_chosen'

This commit is contained in:
Vinicius Moreira
2020-08-31 15:01:20 -03:00
parent fede4fb210
commit 1418383730
16 changed files with 271 additions and 61 deletions

View File

@@ -141,11 +141,13 @@ def map_installed(names: Iterable[str] = None) -> dict: # returns a dict with w
return pkgs
def install_as_process(pkgpaths: Iterable[str], root_password: str, file: bool, pkgdir: str = '.', overwrite_conflicting_files: bool = False) -> SimpleProcess:
if file:
cmd = ['pacman', '-U', *pkgpaths, '--noconfirm'] # pkgpath = install file path
else:
cmd = ['pacman', '-S', *pkgpaths, '--noconfirm'] # pkgpath = pkgname
def install_as_process(pkgpaths: Iterable[str], root_password: str, file: bool, pkgdir: str = '.',
overwrite_conflicting_files: bool = False, simulate: bool = False) -> SimpleProcess:
cmd = ['pacman', '-U'] if file else ['pacman', '-S']
cmd.extend(pkgpaths)
if not simulate:
cmd.append('--noconfirm')
if overwrite_conflicting_files:
cmd.append('--overwrite=*')