[ui][update] displaying requirements and upgrade order

This commit is contained in:
Vinicius Moreira
2020-02-10 12:42:53 -03:00
parent 684ff621d0
commit 3e956a5413
11 changed files with 188 additions and 56 deletions

View File

@@ -359,3 +359,10 @@ def read_dependencies(name: str) -> Set[str]:
def sync_databases(root_password: str, force: bool = False) -> SimpleProcess:
return SimpleProcess(cmd=['pacman', '-Sy{}'.format('y' if force else '')],
root_password=root_password)
def get_version_for_not_installed(pkgname: str) -> str:
output = run_cmd('pacman -Ss {}'.format(pkgname), print_error=False)
if output:
return output.split('\n')[0].split(' ')[1].strip()