Re: SourceForge screwed up games/scummvm
* Moritz Grimm <[EMAIL PROTECTED]> [051103 07:48]: > seeing the updated BASS, I felt like playing it again. During the > install, I ran into this: > > --- snip --- > ===> Verifying install for scummvm->=0.5.1 in games/scummvm > ===> Checking files for scummvm-0.8.0 > >> scummvm-0.8.0.tar.gz doesn't seem to exist on this system. > >> Fetch > http://ovh.dl.sourceforge.net/sourceforge/scummvm/scummvm-0.8.0.tar.gz. > >> Size does not match for /usr/ports/distfiles/scummvm-0.8.0.tar.gz > /bin/sh: test: 3: unexpected operator/operand > *** Error code 2 > --- snap --- I send a patch to fix this a while back but received no comments. The wrong exit code is being tested. Index: infrastructure/mk/bsd.port.mk === RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v retrieving revision 1.719 diff -u -p -r1.719 bsd.port.mk --- infrastructure/mk/bsd.port.mk 10 Oct 2005 19:20:00 - 1.719 +++ infrastructure/mk/bsd.port.mk 3 Nov 2005 16:34:57 - @@ -2067,7 +2067,7 @@ ${_F}: else \ if grep -q "SIZE ($$file)" ${CHECKSUM_FILE}; then \ ${ECHO_MSG} ">> Size does not match for ${_F}"; \ - test `wc -c "$$file" 2>/dev/null|awk '{print $$1}' || echo 0` -lt 3 && rm -f $$file; \ + test `wc -c "$$file" 2>/dev/null || echo 0 | awk '{print $$1}'` -lt 3 && rm -f $$file; \ else \ ${ECHO_MSG} ">> No size recorded for ${_F}"; \ exit 0; \
Re: SourceForge screwed up games/scummvm
David Krause [Thu, Nov 03, 2005 at 10:36:51AM -0600] wrote: >I send a patch to fix this a while back but received no comments. The >wrong exit code is being tested. > Go ahead, commit. It works. Bernd >Index: infrastructure/mk/bsd.port.mk >=== >RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v >retrieving revision 1.719 >diff -u -p -r1.719 bsd.port.mk >--- infrastructure/mk/bsd.port.mk 10 Oct 2005 19:20:00 - 1.719 >+++ infrastructure/mk/bsd.port.mk 3 Nov 2005 16:34:57 - >@@ -2067,7 +2067,7 @@ ${_F}: > else \ > if grep -q "SIZE ($$file)" > ${CHECKSUM_FILE}; then \ > ${ECHO_MSG} ">> Size does not > match for ${_F}"; \ >- test `wc -c "$$file" >2>/dev/null|awk '{print $$1}' || echo 0` -lt 3 && rm -f $$file; \ >+ test `wc -c "$$file" >2>/dev/null || echo 0 | awk '{print $$1}'` -lt 3 && rm -f $$file; \ > else \ > ${ECHO_MSG} ">> No size > recorded for ${_F}"; \ > exit 0; \ > >
Re: SourceForge screwed up games/scummvm
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 3 && rm -f $$file; \ + test `wc -c "$$file" 2>/dev/null || echo 0 | awk '{print $$1}'` -lt 3 && 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