[arch] fix -> AUR: not able to find some repository dependencies when their names are not an exact match

This commit is contained in:
Vinicius Moreira
2020-10-26 11:55:28 -03:00
parent c11bc20245
commit 7dae74e3d0
4 changed files with 30 additions and 1 deletions

View File

@@ -185,12 +185,25 @@ class DependenciesAnalyser:
if dep_name == dep_exp:
providers = remote_provided_map.get(dep_name)
if not providers: # try to find the package through the pacman's search mechanism
match = pacman.find_one_match(dep_name)
if match:
providers = {match}
else: # handling cases when the dep has an expression ( e.g: xpto>=0.12 )
providers = remote_provided_map.get(dep_exp)
if providers is None:
providers = remote_provided_map.get(dep_name)
if not providers: # try to find the package through the pacman's search mechanism
match = pacman.find_one_match(dep_name)
if match:
providers = {match}
if providers and len(providers) > 1:
no_mapped_data = {p for p in providers if
p not in deps_data} # checking providers with no mapped data