Warning: Line X seems to hardcode the version number, consider using ${version} instead

Ryan Schmidt ryandesign at macports.org
Wed Jan 6 21:15:28 PST 2010

On Jan 6, 2010, at 21:59, Dan Ports wrote:

> On Wed, Jan 06, 2010 at 09:29:01PM -0600, Ryan Schmidt wrote:
>> Instead of
>> checksums        zsh-4.3.10.tar.bz2 \
>> use
>> checksums        zsh-${version}.tar.bz2 \
> I don't understand this suggestion -- the checksums line is going to
> have to be regenerated anyway when the version changes, so why not
> hardcode the version number there? It is, after all, the checksum for
> zsh-4.3.10.tar.bz2, not any other version of zsh.
> Am I missing something?

I prefer to update as few lines in the portfile for each update as possible, and update the same piece of information in as few places as possible. So I prefer to have the version number in one place in the portfile instead of two.

More information about the macports-dev mailing list