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



Here is my understanding. Is it correct?

As we know, RPM version is like this format:
a.rpm <Epoch1>
<{Segment1.1}.{Segment1.2}.{Segment1.3}.{Segment1.4}....> <Release1>
b.rpm <Epoch2>
<{Segment2.1}.{Segment2.2}.{Segment2.3}.{Segment2.4}....> <Release2>

1. Epoch is an int32, so it is easy to decide which one is newer
2. If epoch is the same, RPM uses the following rules to make decision:
A) All the non-digit and non-alphabet characters are the basic
separator of comparation phase. In each phase, rpm compares the digit
part and alphabet part one by one. If any part can make the decision,
the comparation finished.
B) During each part comparation
a) From left to right, if a.rpm has a part of digits, but
b.rpm doesn't this part, a.rpm is newer
b) Digit part compares as integer
c) Alphabet part compares as string
d) In current comparation phase if the a.rpm last part is
alphabet, but b.rpm doesn't have this part, the first part of next
phase of b.rpm will compare vs. the a.rpm current part. (So "1.0a.1"
"1.0.a.1" are the same version!!)
3. Release compares like the version part.

.



Relevant Pages

  • Re: galeon needs mozilla = 37:1.7.2
    ... Galeon always lags behind new releases of moziila because the API changes so ... Galeon is not part of the Fedora Core distribution anyway, ... It's an "Epoch" number. ... so for instance version 0.1 of an "Epoch 2" RPM will be ...
    (Fedora)
  • Re: RPM naming question.
    ... It would appear so to human parsers, but not to rpm (unless I've done ... something wrong with the fedora-rpmvercmp script:). ... Epoch is nasty and should be avoided whenever possible. ... matter and those who matter don't mind. ...
    (Fedora)
  • Re: RPM naming question.-part 2
    ... It means that you'll need to use Epoch: 1 in the updated specfile as ... and release will make the new package newer to rpm than the old ... Epoch 1 beats epoch 0 and overrides all other version/release tags ... properly to rpm. ...
    (Fedora)
  • Re: How does rpm command compare 2 rpm files version?
    ... 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 ...
    (comp.os.linux.development.system)
  • Re: How does rpm command compare 2 rpm files version?
    ... 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 ...
    (comp.os.linux.development.system)