[yum-commits] 2 commits - repoquery.py yumdb.py
James Antill
james at osuosl.org
Fri Mar 1 21:22:56 UTC 2013
repoquery.py | 8 +++++++-
yumdb.py | 9 +++++----
2 files changed, 12 insertions(+), 5 deletions(-)
New commits:
commit 6b4139ce28ead44f7e75cf73cdeddc50b9278594
Author: James Antill <james at and.org>
Date: Fri Mar 1 16:22:10 2013 -0500
Add search-quiet command to get just a list of packages.
diff --git a/yumdb.py b/yumdb.py
index 4e549cd..c50159e 100755
--- a/yumdb.py
+++ b/yumdb.py
@@ -116,8 +116,8 @@ def run_cmd(yb, args, inshell=False):
delattr(pkg.yumdb_info, ykey)
print pkg
print " " * 4, ykey, '<unset>'
- elif args[0] == 'search' and len(args) > 2:
- args.pop(0)
+ elif args[0] in ('search', 'search-q', 'search-quiet') and len(args) > 2:
+ cmd = args.pop(0)
ykey = args.pop(0)
done = False
# Maybe need some API so we don't have to load everything?
@@ -132,10 +132,11 @@ def run_cmd(yb, args, inshell=False):
break
if not found:
continue
- if done: print ''
+ if done and cmd == 'search': print ''
done = True
print pkg
- print " " * 4, ykey, '=', yval
+ if cmd == 'search':
+ print " " * 4, ykey, '=', yval
elif args[0] in ['exist?', 'exist', 'exists'] and len(args) > 1:
args.pop(0)
ykey = args.pop(0)
commit 0ef9313cb81ad24f0d54a8c5a41ff64f298239c6
Author: James Antill <james at and.org>
Date: Fri Feb 1 14:39:49 2013 -0500
Take a blunt hammer to --pkgnarrow=installed, not pretty but...
diff --git a/repoquery.py b/repoquery.py
index 45c6826..0d3e33c 100755
--- a/repoquery.py
+++ b/repoquery.py
@@ -1370,7 +1370,6 @@ def main(args):
needgroup = 1
if opts.installed:
opts.pkgnarrow = 'installed'
- opts.disablerepos = ['*']
if opts.nevra:
pkgops.append("nevra")
@@ -1470,6 +1469,13 @@ def main(args):
if opts.show_dupes:
repoq.conf.showdupesfromrepos = True
+
+ if opts.pkgnarrow == 'installed':
+ # Just use a blunt hammer here, to make everyone sane:
+ opts.repoid = []
+ opts.disablerepos = ['*']
+ opts.enablerepos = []
+
if opts.repoid:
found_repos = set()
for repo in repoq.repos.findRepos('*'):
More information about the Yum-commits
mailing list