mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
[arch] fix -> upgrade: crashing during the dependency breakage checking if AUR packages dependents cannot be found
This commit is contained in:
@@ -918,9 +918,9 @@ def map_required_by(names: Iterable[str] = None, remote: bool = False) -> Dict[s
|
|||||||
output = run_cmd('pacman -{} {}'.format('Sii' if remote else 'Qi', ' '.join(names) if names else ''), print_error=False)
|
output = run_cmd('pacman -{} {}'.format('Sii' if remote else 'Qi', ' '.join(names) if names else ''), print_error=False)
|
||||||
|
|
||||||
if output:
|
if output:
|
||||||
res = {}
|
|
||||||
latest_name, required = None, None
|
latest_name, required = None, None
|
||||||
|
res = {}
|
||||||
|
|
||||||
for l in output.split('\n'):
|
for l in output.split('\n'):
|
||||||
if l:
|
if l:
|
||||||
if l[0] != ' ':
|
if l[0] != ' ':
|
||||||
@@ -943,8 +943,11 @@ def map_required_by(names: Iterable[str] = None, remote: bool = False) -> Dict[s
|
|||||||
|
|
||||||
elif latest_name and required is not None:
|
elif latest_name and required is not None:
|
||||||
required.update(required.update((d for d in l.strip().split(' ') if d)))
|
required.update(required.update((d for d in l.strip().split(' ') if d)))
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
elif names:
|
||||||
|
return {n: set() for n in names}
|
||||||
|
else:
|
||||||
|
return {}
|
||||||
|
|
||||||
|
|
||||||
def map_conflicts_with(names: Iterable[str], remote: bool) -> Dict[str, Set[str]]:
|
def map_conflicts_with(names: Iterable[str], remote: bool) -> Dict[str, Set[str]]:
|
||||||
|
|||||||
Reference in New Issue
Block a user