[Yum-devel] [Patch] repoquery tabbed queryformat

Panu Matilainen pmatilai at laiskiainen.org
Wed Jul 20 09:07:16 UTC 2005


On Tue, 19 Jul 2005, Panu Matilainen wrote:

> On Tue, 19 Jul 2005, Paul Nasrat wrote:
>
>> Panu,
>> 
>> I noticed '%{name}\t%{repoid}' didn't work:
>> 
>> This look good?
>
> Thanks, commited. The idea is to have full python string formatting in 
> queryformat some day so any patches towards that are more than welcome, 
> although I'd like to get rid of the regexp hackery :-/

Hum, I'm stupid. Just realized this already works:
[pmatilai at weasel yum-utils]$ ./repoquery.py --qf "%(name)-40s %(repoid)s" 
-a|head -5
a52dec                                   freshrpms
a52dec-devel                             freshrpms
advancescan                              freshrpms
alsaplayer                               freshrpms
armagetronad                             freshrpms

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.

 	- Panu -



More information about the Yum-devel mailing list