Re: How does rpm command compare 2 rpm files' version?



Klein wrote:
> But could you please tell me where can I find the offical rules of rpm
> version comparation, because I need to find the offical information
> about this to decided how to compare 2 rpm files with the version that

In the documentation distributed with the rpm program, in my Fedora Core
4 system it's in /usr/share/doc/rpm-4.4.1/
A quote from the file "dependencies":
"The algorithm that RPM uses to determine the version ordering of
packages is simple and developers are encouraged not to rely on the
details of its working. Developers should keep their numbering scheme
simple so any reasonable ordering algorithm would work. The version
comparison algorithm is in the routine rpmvercmp() and it is just a
segmented
strcmp(3). First, the boundaries of the segments are found using
isdigit(3)/isalpha(3). Each segment is then compared in order with the
right most segment being the least significant. The alphabetical
portions are compared using a lexical graphical ascii ordering, the
digit segments strip leading zeroes and compare the strlen before
doing a strcmp. If both numerical strings are equal, the longer string
is larger. Notice that the algorithm has no knowledge of decimal
fractions,
and perl-5.6 is "older" than perl-5.00503 because the number 6 is less
than
the number 503."

--
Markku Kolkka
markku.kolkka@xxxxxx

.



Relevant Pages

  • Re: Audio Tachometer for 2 stroke engine
    ... dead accurate RPM measurement and is in use now by other similar products, ... shaft or flywheel to directly make the measurement. ... The groundrules for using this device is that a single boat on the water is ... >>>of deriving the required rpm data with which to compare that obtained ...
    (sci.electronics.design)
  • Re: Vista:Slow and Dangerous
    ... It was MOLASSES slow compared to my iMac 1.83GHZ/1 gig of ram/160gig 7200 RPM HD ATI X1600. ... Come back when you want to compare apples to apples. ... Sorry Zara, these two machines are pretty comparable. ... Both are using mobile Core Duo processors, both are using 7200 RPM hard drives. ...
    (comp.sys.mac.advocacy)
  • Re: LKM Trojan installed
    ... Linux CD, boot off of that, mount your harddrive in ... readonly mode and compare the binary signatures (MD5s) of your ... you have a rpm based system like RedHat you can get this information from the ... you'll want to test /hd/bin/ls and compare that to the rpm ...
    (Focus-Linux)
  • Re: comfused about how to compare laptops
    ... A faster disk should improve the performance of any laptop, ... Some are available with a 7200 rpm drive. ... so how to compare? ...
    (comp.sys.laptops)
  • Re: Parallel application ran more slowly than the sequential one?
    ... > Could you tell me what are the reasons to make an parallel application ... Your parallel algorithm may be less efficient than your serial algorithm. ... loading/unloading MPI data structures, sharing files over NFS, process ... Compare the runtime of your parallel program to ...
    (comp.parallel)