packages.filter_packages(): only filter by arch if arch is not None
This commit is contained in:
parent
54c525c8d9
commit
cdc803031e
1 changed files with 4 additions and 1 deletions
|
@ -91,7 +91,10 @@ def filter_packages(
|
||||||
raise Exception("Can't search for packages: no query given")
|
raise Exception("Can't search for packages: no query given")
|
||||||
repo = repo or discover_pkgbuilds()
|
repo = repo or discover_pkgbuilds()
|
||||||
if 'all' in paths:
|
if 'all' in paths:
|
||||||
return [pkg for pkg in repo.values() if set([arch, 'any']).intersection(pkg.arches)]
|
all_pkgs = list(repo.values())
|
||||||
|
if arch:
|
||||||
|
all_pkgs = [pkg for pkg in all_pkgs if set([arch, 'any']).intersection(pkg.arches)]
|
||||||
|
return all_pkgs
|
||||||
result = []
|
result = []
|
||||||
for pkg in repo.values():
|
for pkg in repo.values():
|
||||||
comparison = set()
|
comparison = set()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue