提交 ca38e1c7 编写于 作者: S Srikanth Aithal

Enhance provides package feature in softwaremanager

Currently on rhel based systems, if the name given for provides is
not part of package name itself, provides method return none.
We would have to handle situations where name is present in
filenames, this commit adds functionality of searching packages
based on filenames as well.
Signed-off-by: NSrikanth Aithal <sraithal@linux.vnet.ibm.com>
上级 46c9969b
......@@ -546,7 +546,9 @@ class YumBackend(RpmBackend):
"yum module is required for this operation")
return None
try:
d_provides = self.yum_base.searchPackageProvides(args=[name])
#Python API need to be passed globs along with name for searching
#all possible occurrences of pattern 'name'
d_provides = self.yum_base.searchPackageProvides(args=['*/' + name])
except Exception as exc:
log.error("Error searching for package that "
"provides %s: %s", name, exc)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册