Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Aug 2013 17:58:41 -0400
From:      Sahil Tandon <sahil@tandon.net>
To:        Bryan Drewery <bdrewery@FreeBSD.org>
Cc:        svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, ports-committers@freebsd.org
Subject:   Re: svn commit: r325805 - head/Mk
Message-ID:  <20130831215840.GA13875@magnus>
In-Reply-To: <201308311322.r7VDM2wa076581@svn.freebsd.org>
References:  <201308311322.r7VDM2wa076581@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2013-08-31 at 13:22:02 +0000, Bryan Drewery wrote:

> Log:
>   - make fetch/checksum: If a fetched file does not match the expected size,
>     delete it and try the next site, if there is one to try.
[...]
> +					actual_size=`stat -f %z "$${file}"`; \
> +					if [ $${actual_size} -eq $${CKSIZE} ]; then \
> +						continue 2; \
> +					else \
> +						${ECHO_MSG} "=> Fetched file size mismatch (expected $${CKSIZE}, actual $${actual_size})"; \
> +						if [ $${sites_remaining} -gt 1 ]; then \
> +							${ECHO_MSG} "=> Trying next site"; \
> +							${RM} -f $${file}; \
> +						fi; \
> +					fi; \
>  				fi; \
>  			done; \
>  			${ECHO_MSG} "=> Couldn't fetch it - please try to retrieve this";\

I have not had time to properly investigate, but could the above explain
the following behavior?  Or, perhaps I've messed up something in my
local environment.  Sorry for the line-wraps:

  sahil@mirage [/usr/ports/mail/postfix-current] % sudo make makesum
  ===>  License IPL10 accepted by the user
  ===>  Found saved configuration for postfix-current-2.11.20130825,4
  ===>   postfix-current-2.11.20130825,4 depends on file:
  /usr/local/sbin/pkg - found
  => postfix-2.11-20130825.tar.gz doesn't seem to exist in
  /usr/ports/distfiles/postfix.
  => Attempting to fetch
  ftp://ftp.porcupine.org/mirrors/postfix-release/experimental/postfix-2.11-20130825.tar.gz
  postfix-2.11-20130825.tar.gz                  100% of 3866 kB  910
  kBps
  [: -eq: argument expected
  => Fetched file size mismatch (expected , actual 3959547)
  => Trying next site

This only happens if the distfile does not already exist (and therefore
needs to be fetched), and I 'make makesum'.  Apparently, CKSIZE is
undefined.  Notably, if I 'make fetch' first, and then 'make makesum',
there is no problem.

-- 
Sahil Tandon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130831215840.GA13875>