Version comparison of ports

Anders F Björklund afb at macports.org
Fri Aug 12 07:25:42 PDT 2011


Rainer Müller wrote:

>> 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.

I suppose that would make it more like using "dpkg-vercomp", or something.
http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version

And yes, this is the bikeshed opened by making vercmp() into a vector...

The proposed change was more about changing the digits-beat-alpha option,
than introducing more weird changes like tildes and distepochs, but anyway.

I guess decoupling vercmp from the rpm and dpkg targets failed miserably.

--anders



More information about the macports-dev mailing list