On 2017-1-18 15:25 , Teddy Thomas wrote:
I’m trying to write a Macport that will install some config files in
/etc, and I’m wondering what the best way is to prevent overwriting user
customized files is, and to put the system config files back the way
they were when uninstalling the port. I looked in the Portfile best
practices (https://guide.macports.org/chunked/development.practices.html
<https://guide.macports.org/chunked/development.practices.html>) and
found section 4.7.2, but it’s listed as a TODO. Any insight anyone can
provide would be most appreciated. I’d be happy to contribute
documentation with a way forward. Thanks in advance.

<https://trac.macports.org/wiki/PortfileRecipes#configfiles>

Ports should in general keep their configuration files in ${prefix}/etc, not /etc. Modifying system config files tends to be a bad idea, not least because they may be modified by users and OS updates, so putting them back the way they were is not necessarily correct. Not changing existing files and letting the user deal with updating them is about the only tractable approach.

- Josh

Reply via email to