Version comparison of ports

Rainer Müller raimue at macports.org
Fri Aug 12 06:31:34 PDT 2011


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.

What do you think?

Rainer


More information about the macports-dev mailing list