[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: rpm -qa and architecture info



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'

shows that plus architecture. Is there a shorter command that does the same, i.e. shows name, version, release and arch? It's hard to remember and type that long line. I want something like

rpm -qa [a simple option that shows arch IN ADDITION TO what the preceding option i.e. -qa shows]

Hi Yong,

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).

To be honest, I think the current default is a design bug. Not specifying an architecture results in non-unique output and causes confusion with users.

--
--   dag wieers,  dag wieers com,  http://dag.wieers.com/   --
[Any errors in spelling, tact or fact are transmission errors]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]