Filesize in Portfiles (was Re:  trunk/dports/sysutils/rpm/Portfile)
Jordan K. Hubbard
jkh at apple.com
Tue Mar 8 11:47:41 PST 2011
On Mar 8, 2011, at 12:51 AM, Daniel O'Connor wrote:
> Isn't size useful so you can differentiate between a truncated download and a broken file?
Sure, but that should be an implementation detail. If you do a port fetch, say, and interrupt it 3/4 of the way through, it might detect this and do the equivalent of a curl -C, but that would still not be user visible (other than taking a lot less time the 2nd time around). Of course, that leaves open the question of what to do if the resulting file does not pass the checksum - do you silently throw it away and start over, or do you just throw the usual error (potentially bogusly), or what? This is why the KISS principle was first formulated, I think. :-)
More information about the macports-dev