On Wed, 22 Dec 2010, seth vidal wrote:

On Sun, 2010-12-19 at 00:54 +0100, Pierre-Yves wrote:
On Sat, 2010-12-18 at 19:09 +0200, Panu Matilainen wrote:
How about just adding a dot output mode to repoquery? Something like
--tree-format=[tree|dot] and defaulting tree (feel free to pick a
better name though :)

I'd go more for  --tree-format=[asci|dot] ;-)

The dot formatting in package-graph.py is just a few lines of code, I
don't see any reason why it couldn't be in repoquery directly.

It was my original idea but discussing with Seth on #yum, he told me he
wasn't so fan of having repoquery growing .dot support.


I said I'm not sure we need to add even more things to repoquery. The
repoquery man page and --help output is beginning to as unreadable as
rpm's. that's.... concerning to me.

Sure the help output is starting to get a bit long, but large part of it seems to be redundancies in one way or the other:

Why are these both shown in the output? Just one of them should be visible (and the other one deprecated but kept around for compatibilitys sake):
  --show-duplicates     show all versions of packages
  --show-dupes          show all versions of packages

Another pile of redundancies, relevant for this discussion:
  --tree-requires       list recursive requirements, in tree form
  --tree-conflicts      list recursive conflicts, in tree form
  --tree-obsoletes      list recursive obsoletes, in tree form
  --tree-whatrequires   list recursive what reqauires, in tree form

There's already --requires, --conflicts etc, and there's --recursive too, so the above should easily collapse to one option to control the output format, eg --tree-requires would be '--requires --recursive --output=tree' or something like that.

Whether the current ascii-tree formatting belongs to repoquery is IMO just as questionable (or not) as generating output for dot. I like to think of repoquery as the kind of "do one thing and do it well" traditional unixy tool. In that tradition, the "tree" format should be something that can be reasonably piped to other tools for the actual pretty-printing. The DOT language is defined as "a plain text graph description language", which seems pretty perfect fit for the job.

        - Panu -
_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to