Fixed the regression in #410da78

This commit is contained in:
Clark Perkins 2016-03-23 12:46:14 -05:00
parent bc9a899bc8
commit 1455fab9e3

View File

@ -1004,13 +1004,14 @@ def check_db(*names, **kwargs):
__context__['pkg._avail'] = avail
ret = {}
if names:
repoquery_cmd = repoquery_base + 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 + [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