Best way to install current version of a package?
Ryan Schmidt
ryandesign at macports.org
Thu May 6 15:52:20 UTC 2021
On May 6, 2021, at 08:41, Nathaniel W Griswold wrote:
> I was doing something today and needed nodejs on my system.
>
> I kinda just wanted the current version, but i saw there were a bunch of ‘nodejs’ packages, like nodejs12-nodejs16.
>
> I ended up googling for info about node versions so i could install the right one for my purposes, but i thought maybe something could have been better.
>
> Two questions:
>
> 1) I wanted to avoid installing any beta. Is there a naming convention in macports for beta packages? Is there a possibility a package can be non-stable release with a normal name? If so, is that supposed to be in the description?
>
> 2) Is there anything in macports to just grab the current accepted release of a package? Like a pointer to a current version kinda like on debian systems?
Most software packages that are available in MacPorts are offered in a single port which is supposed to be a recent stable version. Non-stable versions are sometimes offered in a companion port which has the same name but with the -devel suffix, for example minivmac and minivmac-devel. The -devel version is expected to be a drop-in replacement for the stable version and is expected to install files to the same place as the stable version and conflict with one it.
Sometimes a port is a non-stable version even though its name does not end with -devel. This might happen if no stable version of the software has been released yet, or if the developers do not release specific versions, or if some bugfix after the latest stable version is needed to build on the latest macOS or with Apple Silicon for example.
You would expect to be able to identify a non-stable version by its version number, which might contain "alpha", "beta", "RC", or a date usually in YYYYMMDD format. If the port is a -devel port, the long description should probably mention how it differs from the non-devel port, i.e. that it is a non-stable development version.
The node, php, python, perl, ruby, gcc, clang, mysql, postgresql, db, and several other collections of ports are exceptions which offer multiple ports of different versions because it is thought to be useful for a user to able to pick which version of this software they want. The user may even wish to install multiple versions of the software at the same time. Therefore these ports are supposed to install files to different locations and not conflict with one another. (The node port collection disregards this expectation.) The -devel naming scheme is not supposed to be used in this case. (The clang and gcc port collection disregards this expectation.) There is no facility in MacPorts for directing you to whichever of these ports is the latest stable one.
More information about the macports-users
mailing list