[MacPorts] PortfileRecipes modified

MacPorts noreply at macports.org
Mon Jul 13 19:41:46 PDT 2009


Changed page "PortfileRecipes" by blb at macports.org from 75.163.162.171*
Page URL: <http://trac.macports.org/wiki/PortfileRecipes>
Diff URL: <http://trac.macports.org/wiki/PortfileRecipes?action=diff&version=10>
Revision 10
Comment: Add entry about config file handling

-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: PortfileRecipes
=========================================================================
--- PortfileRecipes (version: 9)
+++ PortfileRecipes (version: 10)
@@ -111,3 +111,10 @@
 dist_subdir   ${name}/${version}_${revision}
 }}}
 See for example the [browser:trunk/dports/lang/sicp/Portfile sicp Portfile].
+
+== Proper handling for a port's config files == #configfiles
+Many ports install config files (usually in ${prefix}/etc) which the user is expected to edit as needed, after the port is installed.  Until ticket #2365 is implemented, proper handling of these config files must be done for each port.  If you simply install the config file as part of the port itself, it will then be deleted on uninstall, as well as overwritten on upgrade.  These outcomes are bad since it loses what the user updated.
+
+The current solution is to rename any config files to append a ''.dist'' or ''.sample'' extension to them so that the proper name of the config file is not part of the port.  Then, in a post-activate phase, the port can test for the file's existence and, if it doesn't exist yet, copy it (copied in post-activate directly in ${prefix} keeps the file from being recorded as part of the port).
+
+The [browser:trunk/dports/net/squid/Portfile squid Portfile] and [browser:trunk/dports/security/stegdetect/Portfile stegdetect Portfile] are good examples.

-------8<------8<------8<------8<------8<------8<------8<------8<--------

* The IP shown here might not mean anything if the user or the server is
behind a proxy.

--
MacPorts <http://www.macports.org/>
Ports system for Mac OS

This is an automated message. Someone at http://www.macports.org/ added your email
address to be notified of changes on PortfileRecipes. If it was not you, please
report to .


More information about the macports-changes mailing list