[arch] fix -> search: not able to find installed packages that were renamed on the repositories

This commit is contained in:
Vinicius Moreira
2020-11-12 11:42:17 -03:00
parent 7dae74e3d0
commit f6b0679fd7
3 changed files with 10 additions and 8 deletions

View File

@@ -429,8 +429,9 @@ def get_build_date(pkgname: str) -> str:
def search(words: str) -> Dict[str, dict]:
output = run_cmd('pacman -Ss ' + words, print_error=False)
found = {}
if output:
found, current = {}, {}
current = {}
for l in output.split('\n'):
if l:
if l.startswith(' '):
@@ -450,7 +451,7 @@ def search(words: str) -> Dict[str, dict]:
version = data_split[1].split(':')
current['version'] = version[0] if len(version) == 1 else version[1]
return found
return found
def get_databases() -> Set[str]: