[MacPorts] PortfileRecipes modified

MacPorts noreply at macports.org
Sat Jun 4 16:41:59 PDT 2011


Changed page "PortfileRecipes" by ryandesign at macports.org from 24.155.160.209*
Page URL: <https://trac.macports.org/wiki/PortfileRecipes>
Diff URL: <https://trac.macports.org/wiki/PortfileRecipes?action=diff&version=29>
Revision 29
Comment: rewrite parts of unversioned distfile section, tweak stealth update section

-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: PortfileRecipes
=========================================================================
--- PortfileRecipes (version: 28)
+++ PortfileRecipes (version: 29)
@@ -149,7 +149,7 @@
 Although they would be wise not to do this, some software developers occasionally update their distfile with new changes without changing the distfile's name (e.g., it stays example-1.2.tar.gz).
 The port's `checksums` then need to be updated, but the `version` stays the same (e.g. stays at 1.2).
 So that users will see the update, the `revision` is increased, but users who already have the previous distfile would then experience a checksum mismatch.
-To avoid this, you must also set `dist_subdir`.
+To avoid this, you must change `dist_subdir`.
 By default, `dist_subdir` is ${name}; change it so that it includes a subdirectory named for the version number and the distfile revision number (start at 1 and increment by 1 each time this version's distfile is stealth-updated):
 {{{
 dist_subdir   ${name}/${version}_1
@@ -167,15 +167,21 @@
 
 For software whose developers habitually stealth-update their software, further measures may need to be taken, such as those employed by the dcraw and molden ports.
 But ideally, convince the developers to refrain from stealth-updating.
+Any time a distfile is released to their download area, they should consider it to be immutable.
 
 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:
+Although they would be wise not to do this, some software developers may distribute their distfile with a filename that does not contain the version number (e.g. example.tar.gz); such a port will have its `distname` specified as ${name} rather than its default ${name}-${version}.
+But when updating the port to a new version, the old version's distfile will get in the way, since it has the same name, and users who had a previous version of the port installed will experience a checksum mismatch.
+To avoid this, you must 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].
+
+Ideally, however, convince the developers to put the version number in their distfile names.
+Any time a distfile is released to their download area, they should consider it to be immutable.
 
 See also the previous entry on [#stealth-updates stealth updates].
 

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