----- On 29 Nov, 2016, at 12:14, René J.V. Bertin rjvber...@gmail.com wrote:
> Right now I can only think of 1 important reason why Portfiles might want to > check for the MacPorts version, and that's to detect older MacPorts versions. In which case you're missing the other reason, that is detecting newer MacPorts versions. I have used this in the past to write and commit a Portfile that would not work with a released version of MacPorts. > Wouldn't this feature plead for some form of synchronisation of > macports_version > in master with the one in the release branch? (How to handle the detection of > a > master pseudo-release version and compare it to actual releases is a follow-up > question.) You shouldn't try to extract information from a x.x.99 version number, so no, no such synchronization is required. You can just use [vercmp $macports_version 2.3.4] > 0 to check whether a bugfix you need is available. -- Clemens Lang