Strange RPM versioning problem in qemu in Rawhide

Michael Schwendt mschwendt at gmail.com
Tue Aug 2 13:03:34 UTC 2011


On Tue, 02 Aug 2011 07:49:53 -0500, JMF (Justin) wrote:

> On Tue, 2011-08-02 at 13:37 +0100, Richard W.M. Jones wrote:
> > Below are two packages.  The first one is installed, the second one is
> > built for Koji.  Yum refuses to upgrade the installed package to the
> > second one, saying:
> > 
> > Examining qemu-0.15.0-0.2.2011072859fadcc.fc17.x86_64.rpm: 2:qemu-0.15.0-0.2.2011072859fadcc.fc17.x86_64
> > qemu-0.15.0-0.2.2011072859fadcc.fc17.x86_64.rpm: does not update installed package.
> > 
> > But I don't understand why, since it seems clear that the second
> > package has a higher release than the first package.
> > 
> > In any case, this appears to be a bug in the versioning of these
> > packages, since the "0.2" part of the release string should have been
> > changed to "0.3" when it was built.
> > 
> Indeed it should, though like you, I am not sure why.  with the date
> change, the release is higher and should be a clear update.  When I
> tried to submit the update to bodhi, I got the same thing. Though I am
> doing another update today.

RPM version comparison is not hexadecimal. You need to split the value
into numerical and non-numerical parts:

// full value
# rpmdev-vercmp 20110718525e3df 2011072859fadcc
20110718525e3df > 2011072859fadcc

  that's the one you wondered about


// just the numerical/decimal prefix, longer one wins
# rpmdev-vercmp 2011072859 20110718525
2011072859 < 20110718525

// just the decimal prefix, longer one truncated, hence it loses already
# rpmdev-vercmp 2011072859 2011071852
2011072859 > 2011071852


More information about the devel mailing list