Re: How does rpm command compare 2 rpm files' version?
- From: "Klein" <hubo.obuh@xxxxxxxxx>
- Date: 30 Dec 2005 18:01:37 -0800
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.
.
- Follow-Ups:
- Re: How does rpm command compare 2 rpm files' version?
- From: Enrique Perez-Terron
- Re: How does rpm command compare 2 rpm files' version?
- References:
- How does rpm command compare 2 rpm files' version?
- From: Klein
- Re: How does rpm command compare 2 rpm files' version?
- From: Markku Kolkka
- Re: How does rpm command compare 2 rpm files' version?
- From: Enrique Perez-Terron
- Re: How does rpm command compare 2 rpm files' version?
- From: Klein
- Re: How does rpm command compare 2 rpm files' version?
- From: Markku Kolkka
- How does rpm command compare 2 rpm files' version?
- Prev by Date: Re: to enable C or C++ syntax highlighting in Vi Editor
- Next by Date: Re: How does rpm command compare 2 rpm files' version?
- Previous by thread: Re: How does rpm command compare 2 rpm files' version?
- Next by thread: Re: How does rpm command compare 2 rpm files' version?
- Index(es):
Relevant Pages
|