[Yum-devel] [Patch] repoquery tabbed queryformat

Panu Matilainen pmatilai at laiskiainen.org
Mon Jul 25 16:47:37 UTC 2005


On Sun, 2005-07-24 at 14:41 -0400, seth vidal wrote:
> On Wed, 2005-07-20 at 02:07 -0700, Panu Matilainen wrote:
> > However it would be nice to support rpm's way of formatting as well, eg
> > 'Version     : %-27{VERSION}       Vendor: %{VENDOR}\n' (from rpm -qi)
> > and some other tricks like date conversions, eg
> > Build Date: %{BUILDTIME:date}
> > 
> > ...but that'll need some more sophisticated parsing or funkier regexps.
> 
> don't bury yourself too far under this need - I think repoquery is doing
> a great job as is and adding too many crazy formatting features isn't
> going to help us all that much.

They turned out to be quite easy actually :) This works now with
cvs-head version:

[pmatilai at weasel yum-utils]$ ./repoquery.py --qf "%-25{name} %{repoid}"
-a|head -5
a52dec                    freshrpms
a52dec-devel              freshrpms
advancescan               freshrpms
alsaplayer                freshrpms
armagetronad              freshrpms

[pmatilai at weasel yum-utils]$ ./repoquery.py --qf "%{buildtime}" sox
1115907185
[pmatilai at weasel yum-utils]$ ./repoquery.py --qf "%{buildtime:day}" sox
Thu May 12 2005
[pmatilai at weasel yum-utils]$ ./repoquery.py --qf "%{buildtime:date}" sox
Thu May 12 17:13:05 2005

	- Panu -




More information about the Yum-devel mailing list