RPM Community Forums

Mailing List Message of <rpm-devel>

Re: Implementing EVR comparisons using *RE's ?

From: Ralf S. Engelschall <rse+rpm-devel@rpm5.org>
Date: Fri 08 May 2009 - 19:40:38 CEST
Message-ID: <20090508174038.GA70749@engelschall.com>
On Fri, May 08, 2009, Jeff Johnson wrote:

> On May 8, 2009, at 12:29 PM, Jeff Johnson wrote:
>>
>> RPM versions are inequalities represented as half-planes, not points.
>
> "half-planes" is of course neither precise nor correct. But
> RPM EVR inequalities do not always have measure == 0 like
> points do.

Can you be a little bit more specific here, Jeff, please? Because I'm
not sure I understand why the result of -1/0/+1 is such unreasonable.

From my personal point of view, version identifiers (I intentionally
avoid the term "number" here, as those strings are not really numbers)
are text-representations of _points_ in time on particular product
_branches_. Comparing two versions means to decide whether they are
equal or which one is the _successor_ of the other -- while _successor_
here is "defined" based on the particular product evolution process and
the used branching scheme.

This means that if the branching scheme is well known and the
text-representations of versions in this scheme are precisely defined
(as in: "N.M.X correspond to the trunk at the N-th generation, there is
a branch N.M forked off the trunk and a point X on this N.M branch",
etc) then one can do a reasonable version comparison (even across
branches) with the results -1/0/+1. If the scheme is not known or the
text-representations of versions less precisely used, I agree: one can
only return true/false.

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com
Received on Fri May 8 19:50:11 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.