David Krause wrote:
I send a patch to fix this a while back but received no comments. The wrong exit code is being tested.
- test `wc -c "$$file" 2>/dev/null|awk '{print $$1}' || echo 0` -lt 30000 && rm -f $$file; \ + test `wc -c "$$file" 2>/dev/null || echo 0 | awk '{print $$1}'` -lt 30000 && rm -f $$file; \
This fixes it, indeed (thanks!)... except entirely for the SourceForge case. It continues trying to fetch the DISTFILE from the next MASTER_SITE. However, since sf.net sends the error message with a different filename than DISTNAME, the ``rm -f $$file'' does not clean up the mess.
This doesn't seem to be quite that easy ... I'm stuck thinking about it. The only half-usable hack I can think of is assuming that FETCH_CMD supports a `-o' parameter. All nice for ftp(1) and curl, but wget uses -O. Nevermind, it's a stupid idea anyways. Is there a way to detect what *really* ends up in the filesystem after downloading something?
Moritz