Changing the rpm default queryformat to include arch

Panu Matilainen pmatilai at laiskiainen.org
Sat Nov 24 08:16:25 UTC 2007


On Fri, 23 Nov 2007, Nils Philippsen wrote:
>
> On Fri, 2007-11-23 at 08:28 +0100, nodata wrote:
>> Am Donnerstag, den 22.11.2007, 17:00 -0600 schrieb Callum Lerwick:
>>> On Wed, 2007-11-21 at 10:49 +0200, Panu Matilainen wrote:
>>>> To put it shortly, I going to switch the default rpm queryformat to
>>>> include package architecture (ie what you get now with
>>>> rpm -q --qf "%{name}-%{version}-%{release}.%{arch}\n") in a few days or
>>>> so.
>>>
>>> Not %{name}-%|epoch?{%{epoch}:}|%{version}-%{release}.%{arch} ? :)
>> That would encourage the use of epochs.

Hardly. It would however stop the ages old pretense of epochs being some 
mysterious invisible evil people are afraid to talk aloud of. It would 
also largely stop the "look I found a bug in rpm: it thinks foo-1.2 is 
newer than foo-2.0" reports/questions.

To go that route I think the default file name should also be changed to 
include epoch if present. Would probably break another big bunch of 
scripts people have, but relying on filename for rpm name and version 
information is very broken to begin with anyway (and easily fixed)

The ugly part is that it makes parsing harder as you have to account for 
the possibility of epoch being or not being there always, but OTOH you can 
always pick your own queryformat if you don't want to deal with it.

> I don't think so -- "Look, this package has an epoch, I'll add that to
> my package too"? Hardly. If I'm interested in the version of a package,
> I'm interested in the epoch, too, if there's one. IMO, the only reason
> against listing the epoch here is that RPM itself doesn't understand it
> when specifying packages:
>
> nils at wombat:~> rpm -q gimp-2:2.4.1-1.fc8.x86_64
> package gimp-2:2.4.1-1.fc8.x86_64 is not installed
> nils at wombat:~> rpm -q gimp-2.4.1-1.fc8.x86_64
> gimp-2.4.1-1.fc8

That can be fix.

 	- Panu -




More information about the fedora-devel-list mailing list