[MacPorts] PortfileRecipes modified

MacPorts noreply at macports.org
Sat Jan 30 02:08:54 PST 2010


Changed page "PortfileRecipes" by ryandesign at macports.org from 75.34.84.85*
Page URL: <http://trac.macports.org/wiki/PortfileRecipes>
Diff URL: <http://trac.macports.org/wiki/PortfileRecipes?action=diff&version=16>
Revision 16
Comment: Split unversioned distfiles section out of stealth upgrades section

-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: PortfileRecipes
=========================================================================
--- PortfileRecipes (version: 15)
+++ PortfileRecipes (version: 16)
@@ -140,12 +140,23 @@
 For example, libpixman is known to work with Xcode 1.5 but fail with 1.1, so [changeset:45892 libpixman now requires Xcode 1.5] on Panther, even though compatibility with Xcode 1.2 was not tested.
 It is better to make a user upgrade to a newer Xcode than for a port maintainer to spend time testing old versions.
 
-== Dealing with stealth updates == #stealth-updates
-Some software may update their distfile with new changes without changing the version number (e.g., it stays example-1.2.tar.gz); another case where this happens is when the distfile is unversioned (e.g., example.tar.gz).  The safest way to deal with this is to keep the port's version unchanged (e.g., stays at 1.2) while increasing the revision.  This however will cause a checksum mismatch for those who already have the previous distfile.  To work around this, set dist_subdir so that it includes the version and revision:
+== Stealth updates == #stealth-updates
+Some software may update their distfile with new changes without changing the version number (e.g., it stays example-1.2.tar.gz). The safest way to deal with this is to keep the port's version unchanged (e.g., stays at 1.2) while increasing the revision.  This however will cause a checksum mismatch for those who already have the previous distfile.  The correct solution to this problem is to change dist_subdir. By default, dist_subdir is ${name}; change it so that it includes a subdirectory named for the version and revision:
 {{{
 dist_subdir   ${name}/${version}_${revision}
 }}}
-See for example the [browser:trunk/dports/lang/sicp/Portfile sicp Portfile].
+This example is from the [browser:trunk/dports/lang/sicp/Portfile sicp Portfile].
+
+See also the next entry on [#unversioned-distfiles unversioned distfiles].
+
+== Unversioned distfiles == #unversioned-distfiles
+Some software may distribute their distfile with a filename that does not contain the version number (e.g. example.tar.gz); such a port will likely change distname from its default ${name}-${version} to just ${name}. But when updating the port version, the old version's distfile will get in the way, since it has the same name.  The correct solution to this problem is to change dist_subdir. By default, dist_subdir is ${name}; change it so that it includes a subdirectory named for the version:
+{{{
+dist_subdir   ${name}/${version}
+}}}
+This example is from the [browser:trunk/dports/x11/winetricks/Portfile winetricks Portfile].
+
+See also the previous entry on [#stealth-updates stealth updates].
 
 == 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.

-------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