Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make yum module work with list=pkgspec #826

Merged
merged 1 commit into from
Aug 9, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions library/yum
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def repolist(repoq, qf="%{repoid}"):

def list_stuff(conf_file, stuff):
qf = "%{name}|%{epoch}|%{version}|%{release}|%{arch}|%{repoid}"
repoq = '%s --plugins --quiet -q ' % repoquery
repoq = '%s --show-duplicates --plugins --quiet -q ' % repoquery
if conf_file and os.path.exists(conf_file):
repoq = '%s -c %s --plugins --quiet -q ' % (repoquery,conf_file)
repoq = '%s -c %s --show-duplicates --plugins --quiet -q ' % (repoquery,conf_file)

if stuff == 'installed':
return [ pkg_to_dict(p) for p in is_installed(repoq, '-a', qf=qf) if p.strip() ]
Expand Down Expand Up @@ -385,7 +385,7 @@ def main():
pkg=dict(aliases=['name']),
# removed==absent, installed==present, these are accepted as aliases
state=dict(default='installed', choices=['absent','present','installed','removed','latest']),
list=dict(choices=['installed','updates','available','repos','pkgspec']),
list=dict(),
conf_file=dict(default=None),
)
)
Expand Down