Breaking long dependency chains

Joshua Root jmr at macports.org
Mon Mar 19 10:33:14 PDT 2012


On 2012-3-20 03:11 , Ryan Schmidt wrote:
> 
> On Mar 19, 2012, at 05:49, Freek Dijkstra wrote:
> 
>> A possible solution is perhaps to split packages like Y -- which provide
>> both a GUI and a command line (think texlive) into two packages: the
>> command-line core, and the GUI tools. A prime example of sheer
>> awesomeness in this case are the recent splits of Python into a core
>> python package (with few dependencies) and separate py27-tkinter and
>> py27-gdbm packages.

Those splits were actually motivated by a circular dependency (some X11
bits need python to build and tk needs X11) and license incompatibility
(gdbm is now GPL-3).

>> Debian provides the ability to use a single source package (port) with
>> multiple installed packages. I know texlive does some neat trickery in
>> this respect, but I can't find info about this in the Portfile
>> documentation. Is that supported, and should it?
> 
> Yes, MacPorts recently gained this feature; we call it "subports". The unified python, perl5 and php portgroups use subports, as do individual ports like pianobar, pure, VillainousStyle, and php54 (in my users directory). Since the feature is a recent addition, many ports that really should be split into subports have not yet been split.

Subports aren't the same thing as subpackages. The former is just a way
of reducing code duplication when there are ports that share a lot of
code. With the latter, you create multiple packages after building the
source just once. Since we currently have no concept of a package as
distinct from a port, we can't do that.

But yes, you can achieve much the same result by splitting a port into
multiple ports (whether you use subports or not).

- Josh


More information about the macports-dev mailing list