All,
I am now building rpms on, and using a multi-lib arch (x86_64) for the first time ... when using the standard command:
rpm -qa | grep pkg_name
The results might be pkg_name.i386 or pkg_name.x86_64 ... or both. But, the way it is shown by the default query format, looks the same ... like this:
pkg_name pkg_name ---------------------------- example:
[root@x86-64 ~]# rpm -qa | grep popt
popt-1.9.1-21 popt-1.9.1-21 ----------------------------
To fix this problem on multi-lib machines (and change the default query format), you can change your .rpmmacros (or create a .rpmmacros) in your user home directory and add this line:
%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}
--------------------------- Now the result of the above example is:
[root@x86-64 ~]# rpm -qa | grep popt
popt-1.9.1-21.x86_64 popt-1.9.1-21.i386 ---------------------------
So now you can easily tell which arch of a program is installed on multi-lib machines.
Thanks, Johnny Hughes
On Tue, 11 Jan 2005, Johnny Hughes wrote:
To fix this problem on multi-lib machines (and change the default query format), you can change your .rpmmacros (or create a .rpmmacros) in your user home directory and add this line:
%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}
Wouldnt it make sense for that to be standard on multi-arch releases ???
Or would it break something else ??
Regards Lance
On Wednesday, 12 January 2005, at 00:40:53 (+0000), Lance Davis wrote:
Wouldnt it make sense for that to be standard on multi-arch releases ???
Or would it break something else ??
It would break the fact that people expect "rpm -qa" to be in a certain format by default. Principle of Least Surprise, and all that.
Michael
On Wed, 2005-01-12 at 00:40 +0000, Lance Davis wrote:
On Tue, 11 Jan 2005, Johnny Hughes wrote:
To fix this problem on multi-lib machines (and change the default query format), you can change your .rpmmacros (or create a .rpmmacros) in your user home directory and add this line:
%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}
Wouldnt it make sense for that to be standard on multi-arch releases ???
Or would it break something else ??
I had to rewrite some local scripts that I had written that don't expect there to be a .arch in rpm -qa ... so it might break some things.
Now the result of the above example is:
[root@x86-64 ~]# rpm -qa | grep popt
popt-1.9.1-21.x86_64 popt-1.9.1-21.i386
So now you can easily tell which arch of a program is installed on multi-lib machines.
useless trivia: 'yum list installed'
will display that stuff and epochs if they're there, too. and in yum 2.1.x it does all that w/o every talking to the repos.
yum -C list installed on 2.0.X will do that same thing.
-sv