packages: filter_pkgbuilds(): track which queries were matched and error on incompletely satisified queries
This commit is contained in:
parent
103c18a171
commit
8b504142de
1 changed files with 9 additions and 2 deletions
|
@ -416,6 +416,7 @@ def filter_pkgbuilds(
|
||||||
all_pkgs = [pkg for pkg in all_pkgs if set([arch, 'any']).intersection(pkg.arches)]
|
all_pkgs = [pkg for pkg in all_pkgs if set([arch, 'any']).intersection(pkg.arches)]
|
||||||
return all_pkgs
|
return all_pkgs
|
||||||
result = []
|
result = []
|
||||||
|
to_find = list(paths)
|
||||||
for pkg in repo.values():
|
for pkg in repo.values():
|
||||||
comparison = set()
|
comparison = set()
|
||||||
if use_paths:
|
if use_paths:
|
||||||
|
@ -429,7 +430,13 @@ def filter_pkgbuilds(
|
||||||
logging.warn(f"Pkg {pkg.name} matches query {matches[0]} but isn't available for architecture {arch}: {pkg.arches}")
|
logging.warn(f"Pkg {pkg.name} matches query {matches[0]} but isn't available for architecture {arch}: {pkg.arches}")
|
||||||
continue
|
continue
|
||||||
result += [pkg]
|
result += [pkg]
|
||||||
|
for m in matches:
|
||||||
|
to_find.remove(m)
|
||||||
|
|
||||||
if not allow_empty_results and not result:
|
if not allow_empty_results:
|
||||||
|
if not result:
|
||||||
raise Exception(f'No packages matched by {fields_err}: ' + ', '.join([f'"{p}"' for p in paths]))
|
raise Exception(f'No packages matched by {fields_err}: ' + ', '.join([f'"{p}"' for p in paths]))
|
||||||
|
if to_find:
|
||||||
|
raise Exception(f"No packagages matched by {fields_err}: " + ', '.join([f'"{p}"' for p in to_find]))
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue