mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #27049 from johanek/repoquery-dedupe
Run repoquery less
This commit is contained in:
commit
8b554dd16f
1 changed files with 4 additions and 4 deletions
|
@ -745,13 +745,13 @@ def check_db(*names, **kwargs):
|
|||
__context__['pkg._avail'] = avail
|
||||
|
||||
ret = {}
|
||||
repoquery_cmd = repoquery_base + ' {0}'.format(" ".join(names))
|
||||
provides = sorted(
|
||||
set(x.name for x in _repoquery_pkginfo(repoquery_cmd))
|
||||
)
|
||||
for name in names:
|
||||
ret.setdefault(name, {})['found'] = name in avail
|
||||
if not ret[name]['found']:
|
||||
repoquery_cmd = repoquery_base + ' {0}'.format(name)
|
||||
provides = sorted(
|
||||
set(x.name for x in _repoquery_pkginfo(repoquery_cmd))
|
||||
)
|
||||
if name in provides:
|
||||
# Package was not in avail but was found by the repoquery_cmd
|
||||
ret[name]['found'] = True
|
||||
|
|
Loading…
Add table
Reference in a new issue