PortGroup directory hierarchy/priority

Rainer Müller raimue at macports.org
Thu Mar 31 04:54:20 PDT 2016


On 2016-03-30 19:21, René J. V. Bertin wrote:
> Rainer Müller wrote:
> 
>> 1. _resources/port1.0/group/*.tcl in ports tree of this port
>> 2. _resources/port1.0/group/*.tcl in default ports tree
> 
> A "check in 1) and then in 2) if not found" even if 1) is inside a tree that 
> doesn't override the default tree?

Yes, resources are always meant to be for the very ports tree they are
in. If the file is not provided by this ports tree, the default ports
tree will be used.

>> 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.
> 
> The problem with that approach is that there are many PortGroups that apply to 
> more than just a few ports.
> I can see the occasional use case for limiting certain PortGroup customisations 
> to a very specific set of (local) ports, but I'm seeing much more use for 
> letting custom PortGroups behave like custom ports, i.e. override the default.
> Right now, someone wanting to test my KF5 ports will have to replace at least 
> the default Qt5 PortGroup, and remember to repeat that after each and every 
> `port selfupdate`.

Does your custom ports tree not just provide a custom implementation of
this port group? Or do the ports using this modified port group not need
any further modifications, but you do not want to copy all Portfiles to
your ports tree?

The lookup strategy is also the same for mirror/archive sites, variant
descriptions, livecheck. I am not sure whether it would make sense to
change this for all of them (for example archive sites are definitely
only local to a ports tree) or to introduce a special lookup just for
port groups...

Rainer


More information about the macports-dev mailing list