PortGroup directory hierarchy/priority

Rainer Müller raimue at macports.org
Sun Mar 27 08:33:28 PDT 2016

On 2016-03-27 16:57, René J.V. Bertin wrote:
> Can someone please summarise the exact priority rules used in
> resolving the file to be included when using a PortGroup statement in
> a port?

1. _resources/port1.0/group/*.tcl in ports tree of this port
2. _resources/port1.0/group/*.tcl in default ports tree

This is here in the base source:

proc PortGroup:

porc getportresourcepath/getdefaultportresourcepath:

> I know that the _resource directory in a custom port tree only
> applies to the ports in that tree. Is there a specific reason why the
> ports from a custom tree can override the ones from the default tree
> (by defining the custom tree as a higher priority source, earlier in
> sources.conf) but not the PortGroup files?

The _resource directory is meant to contain files that are specific to
this ports tree. This allows local modifications to port groups in a
ports tree without influencing other ports trees.


More information about the macports-dev mailing list