License question

Ryan Schmidt ryandesign at macports.org
Sun Jan 1 19:56:26 PST 2012


On Jan 1, 2012, at 21:38, Mark Brethen wrote:

> Can you install both the port and all it's subports?

Yes, that's the point. :) Subports behave like regular ports. The only difference is their code is stored in a single Portfile, and you can thus easily share common code amongst subports.

For example:

$ port info py-distribute | head -n 2
py-distribute @0.6.24 (python, devel)
Sub-ports:            py24-distribute, py25-distribute, py26-distribute, py27-distribute, py31-distribute, py32-distribute

$ port installed name:py.*-distribute
The following ports are currently installed:
  py24-distribute @0.6.24_0+universal (active)
  py25-distribute @0.6.24_0+universal (active)
  py26-distribute @0.6.24_0+universal (active)
  py27-distribute @0.6.24_0+universal (active)
  py31-distribute @0.6.24_0+universal (active)

$ port info pure | head -n 2
pure @0.51 (lang)
Sub-ports:            pure-mode.el

$ port installed pure pure-mode.el
The following ports are currently installed:
  pure @0.51_0 (active)
  pure-mode.el @0.51_0 (active)

$ port info php54 | head -n 2
php54 @5.4.0RC4 (lang, php, www)
Sub-ports:            php54-apache2handler, php54-cgi, php54-fpm

$ port installed name:php54
The following ports are currently installed:
  php54 @5.4.0RC4_0+universal (active)
  php54-apache2handler @5.4.0RC4_0+universal (active)
  php54-cgi @5.4.0RC4_0+universal (active)
  php54-fpm @5.4.0RC4_0+universal (active)

This is better than how it is in the current php5 port, where the apache2 handler and the cgi binary are variants. What if a user has already installed php5 with the apache2 variant, and now also wants the cgi binary? They have to rebuild the whole php5 port. It would be better if they could just install the CGI binary by itself. With the new php54 port's subports, now they can.

Furthermore, in the case of PHP, there are currently 33 ports for the bundled PHP modules: 

$ port file name:^php5- | xargs grep bundled$ | wc -l
      33

All of these modules are in the same main PHP distfile. Whenever I update PHP to a new version, I have to update the php5 port, and those 33 other ports, each of which gets the same version number and the same checksums. For example:

https://trac.macports.org/changeset/83025

It will be much easier to update PHP when all of these modules become subports within the PHP port. Then I'll only have to update the version number and checksums in one place.





More information about the macports-dev mailing list