Versions in ports

Ryan Schmidt ryandesign at macports.org
Mon Sep 14 18:26:26 PDT 2015


On Sep 14, 2015, at 09:22, Artur Szostak wrote:
> 
> After about a year's worth of experience with MacPorts, there is something that I still do not understand: why is there no mechanism to express version requirements in the dependency information for a Portfile?

Because MacPorts does not have the capability to install an arbitrary version of a port (only the current version), there is no way to specify a dependency on an arbitrary version of a port (only the current version). 

In situations where this is actually needed, port authors create multiple ports, one for each branch. This has been done for example in the gcc, clang, php and python ports, among others. 


> I have been running into a number of situations where upgrading or downgrading an individual port leads to an inconsistent/incompatible combination of package versions. It seems that unless you are busy hacking away at your system, the only reasonable upgrade path is always:
>  sudo port upgrade installed

You are correct that downgrading a port would likely cause problems, and in some cases as discussed in this thread upgrading some ports while not upgrading others can also cause problems. This is why in multiple places we advocate using "sudo port upgrade outdated".


> To me, it feels like the MacPorts documentation is misleading the end user to believe that upgrading/downgrading individual packages is a routine and safe procedure, when my experience tells me otherwise. Can anyone point me to the reason behind these design decisions?

If there is any documentation advocating upgrading individual ports, or especially documentation advocating downgrading a port, please send us the URL so that we can correct the information. 


More information about the macports-users mailing list