Make RPM query commands include architecture by default

Posted in Linux , tweaks

.rpmmacros

You can change the default behavior of queries using the RPM command by putting a single line in your .rpmmacros

echo %_query_all_fmt %%{name}-%%{version}-%%{release}-%%{arch} >> ~/.rpmmacros

Before .rpmmacros

user@rootninja ~$ rpm -qa
gnome-applets-2.28.0-2.fc12
fontmatrix-0.6.99-3.r1073.fc12
hdparm-9.16-3.fc12
perf-2.6.32.21-166.fc12
fipscheck-lib-1.2.0-4.fc12
gnome-media-libs-2.28.5-1.fc12
font-manager-0.5.6-1.fc12

After .rpmmacros

user@rootninja ~$ rpm -qa
gnome-applets-2.28.0-2.fc12-x86_64
fontmatrix-0.6.99-3.r1073.fc12-x86_64
hdparm-9.16-3.fc12-x86_64
perf-2.6.32.21-166.fc12-noarch
fipscheck-lib-1.2.0-4.fc12-x86_64
gnome-media-libs-2.28.5-1.fc12-x86_64
font-manager-0.5.6-1.fc12-x86_64

rpm_tach-125x125

You can also do this manually each time by including the –qf or query format in your rpm command and specifying whatever variables and static text you want to see that way.

If you do it manually, don’t forgot to include a trailing newline \n or other delimeter as it will not be provided automatically.

Posted by admica   @   15 October 2010

Related Posts

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

Name

Email

Website

*

Previous Post
«
Next Post
»
Powered by Wordpress   |   Lunated designed by ZenVerse

Valid XHTML 1.0 Transitional