mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 08:44:15 +02:00
[arch] improvement -> upgrade: allowing the user to bypass dependency breakage scenarios
This commit is contained in:
@@ -707,12 +707,15 @@ def map_updates_data(pkgs: Iterable[str], files: bool = False) -> dict:
|
||||
return res
|
||||
|
||||
|
||||
def upgrade_several(pkgnames: Iterable[str], root_password: str, overwrite_conflicting_files: bool = False) -> SimpleProcess:
|
||||
def upgrade_several(pkgnames: Iterable[str], root_password: str, overwrite_conflicting_files: bool = False, skip_dependency_checks: bool = False) -> SimpleProcess:
|
||||
cmd = ['pacman', '-S', *pkgnames, '--noconfirm']
|
||||
|
||||
if overwrite_conflicting_files:
|
||||
cmd.append('--overwrite=*')
|
||||
|
||||
if skip_dependency_checks:
|
||||
cmd.append('-d')
|
||||
|
||||
return SimpleProcess(cmd=cmd,
|
||||
root_password=root_password,
|
||||
error_phrases={'error: failed to prepare transaction', 'error: failed to commit transaction', 'error: target not found'},
|
||||
|
||||
Reference in New Issue
Block a user