143 | | == Dealing with stealth updates == #stealth-updates |
144 | | 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: |
| 143 | == Stealth updates == #stealth-updates |
| 144 | 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: |
148 | | See for example the [browser:trunk/dports/lang/sicp/Portfile sicp Portfile]. |
| 148 | This example is from the [browser:trunk/dports/lang/sicp/Portfile sicp Portfile]. |
| 149 | |
| 150 | See also the next entry on [#unversioned-distfiles unversioned distfiles]. |
| 151 | |
| 152 | == Unversioned distfiles == #unversioned-distfiles |
| 153 | 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: |
| 154 | {{{ |
| 155 | dist_subdir ${name}/${version} |
| 156 | }}} |
| 157 | This example is from the [browser:trunk/dports/x11/winetricks/Portfile winetricks Portfile]. |
| 158 | |
| 159 | See also the previous entry on [#stealth-updates stealth updates]. |