Updating macports.conf
Rainer Müller
raimue at macports.org
Fri Feb 15 20:50:49 PST 2008
Jordan K. Hubbard wrote:
>> An up-to-date macports.conf provides a good overview over all options
>> and contains short documentation lines.
>> [ ... ]
>> 1) Add macports.conf.dist
>
> Yes, at a minimum, you need an updated reference config file available
> at all times, though I dislike the .dist approach. If it's just a
> passive reference, then you need to either write a merge utility (like
> FreeBSD's "mergemaster") or dump the entire problem of merging in the
> user's lap, neither solution bringing much happiness.
Ok, the file would not necessarily be called like this. It could also go
into share/doc/macports or anywhere else. And yes, the merging is the
big disadvantage of this approach.
> A better
> approach is FreeBSD's /etc/defaults - a set of shadow files you keep
> up to date, making the primary configuration file an override. You
> can still get stale data lingering in the user configuration file,
> keeping an option on or off when the default has changed, but
> sometimes that's a feature.
>
> This is, in any case, how I'd handle this one. Always install a
> macports.conf.default and add some logic to load the two in order
> (macports.conf should, in fact, be optional).
This sounds like a good solution. Although it does not make the
documentation lines visible to the user.
Rainer
More information about the macports-dev
mailing list