Version comparison of ports

Jeff Johnson n3npq at mac.com
Fri Aug 12 06:50:18 PDT 2011


On Aug 12, 2011, at 9:31 AM, Rainer Müller wrote:

> On 2011-08-12 11:33 , Anders F Björklund wrote:
>> I renamed* the old pextlib function called "rpm-vercomp" to just "vercmp",
>> (and fixed the spelling of it too, while I was at it, rhymes with strcmp)
>> since the "compatibility" would depend on your RPM version and/or config.
>> It also allows for changing sort order in e.g. MacPorts 2.1, if desired...
> 
> Another idea I discussed with Joshua once was to introduce a new
> character to mark pre-releases like beta versions, release candidates,
> etc. This could avoid bumping the epoch often (especially in -devel ports).
> 
> At the moment bumping from 1.0-rc1 to 1.0 needs an increase of the
> epoch. Instead, we could use the character "~", which indicates that
> this version should be considered less than the version named before
> that character. For this example, 1.0~rc1 should be considered less than
> 1.0. Of course, 1.0~rc2 would still be greater.
> 

The issue is well known in RPM packaging and version comparison.

> What do you think?
> 

I think its *crazy* to litter package versions with
extra speshul adornments like '~' for the sole purpose
of avoiding epoch++.

The change -- no matter what -- introduces instant
"legacy incompatibility" which will take years to
ripple into a de facto consensus.

If you need to mark a state like "alpha" or "beta" or
"Genuine MacPorts Buily", then do so with an attached attribute,
not by concatenating markers onto a version and adding special
characters which will need fixing in lots and lots of tools
forevermore.

hth

73 de Jeff



More information about the macports-dev mailing list