[arch] improvement -> upgrade: checking specific version requirements and marking packages as 'cannot upgrade' when these requirements are not met

This commit is contained in:
Vinicius Moreira
2020-09-01 19:36:05 -03:00
parent d7225dab3b
commit feb061efa4
18 changed files with 286 additions and 43 deletions

View File

@@ -914,8 +914,8 @@ def get_cache_dir() -> str:
return '/var/cache/pacman/pkg'
def map_required_by(names: Iterable[str] = None) -> Dict[str, Set[str]]:
output = run_cmd('pacman -Qi {}'.format(' '.join(names) if names else ''))
def map_required_by(names: Iterable[str] = None, remote: bool = False) -> Dict[str, Set[str]]:
output = run_cmd('pacman -{} {}'.format('Sii' if remote else 'Qi', ' '.join(names) if names else ''), print_error=False)
if output:
res = {}