Re: Strange RPM versioning problem in qemu in Rawhide

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

 



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.

The version comparison method of RPM is a bit quirky and non-obvious: It
separates elements at dots (obvious) but also at changes between digits
and other characters (non-obvious). Let's look at only the releases of
the two packages:

0.2.20110718525e3df.fc16
0.2.2011072859fadcc.fc17

Split up into the elements that RPM compares, these are:

0, 2, 20110718525, e,     3,  df, fc, 16
0, 2, 2011072859,  fadcc, fc, 17
      ^^^^^^^^^^^^
The third elements cause this evr-comparison to have a result which you
don't expect. Bump the second element "2" to "3" and you should be
fine :-).

BTW, rpmdev-vercmp lets you compare arbitrary [e:]v[-r] combinations on
the command line without having  to have the affected packages handy.

Nils
-- 
Nils Philippsen      "Those who would give up Essential Liberty to purchase 
Red Hat               a little Temporary Safety, deserve neither Liberty
nils@xxxxxxxxxx       nor Safety."  --  Benjamin Franklin, 1759
PGP fingerprint:      C4A8 9474 5C4C ADE3 2B8F  656D 47D8 9B65 6951 3011

-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux