[yum-commits] repoquery.py
James Antill
james at osuosl.org
Thu Jan 19 22:17:48 UTC 2012
repoquery.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 9c4e4d49337ba7130cf532df897eb1f459ba190b
Author: James Laska <jlaska at redhat.com>
Date: Thu Jan 19 14:15:04 2012 -0500
Honor --queryformat when using --output=ascii-tree.
While using the ascii-tree output format, I found it helpful to support
the --queryformat option to allow customized output using QUERYTAGS.
diff --git a/repoquery.py b/repoquery.py
index 2eb7834..7660789 100755
--- a/repoquery.py
+++ b/repoquery.py
@@ -325,12 +325,13 @@ class pkgQuery:
print "%s%s [%s]" % (indent, str(req), str(val))
# These are common helpers for the --tree-* options...
- @staticmethod
- def _tree_print_req(req, val, level):
+ def _tree_print_req(self, req, val, level):
indent = ''
if level:
indent = ' | ' * (level - 1) + ' \_ '
- print "%s%s [%s]" % (indent, str(req), str(val))
+ self.pkg = req
+ self.name = req.name
+ print "%s%s [%s]" % (indent, self.fmt_queryformat(), str(val))
def _tree_pkg2uniq(self, pkg):
""" Turn a pkg into a "unique" req."""
if self.yb and self.yb.conf.showdupesfromrepos:
More information about the Yum-commits
mailing list