rpm -qa and architecture info

m.roth at 5-cent.us m.roth at 5-cent.us
Thu Mar 25 18:40:11 UTC 2010


Dag wrote:
> On Tue, 9 Mar 2010, Yong Huang wrote:
>
>> `rpm -qa' shows the package names (and versions and releases). This
>> command
>>
>> rpm -qa --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n'
>>
>
> What I often do is create a file called /etc/rpm/macros.query_all_fmt and
> add the following content:
>
>  	%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}
>
> This will automatically show the architecture in a way that is compatible
> with yum if you do rpm -qa.
>
> This, however, will break any programs that does not specifically
> provide a query format and somehow expects the default output (without
> architecture).
>
*shrug*
I normally run rpm -qa | grep <whatever>

        mark




More information about the redhat-list mailing list