Subject: Re: pkg/26448
To: Robert Elz <kre@munnari.OZ.AU>
From: Juan RP <juan@xtraeme.nopcode.org>
List: pkgsrc-bugs
Date: 11/24/2004 16:37:56
--Signature=_Wed__24_Nov_2004_16_37_56_+0100_vJIc0DI=c6qLcLVP
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

On Wed, 24 Nov 2004 16:05:23 +0700
Robert Elz <kre@munnari.OZ.AU> wrote:

> I'll take another look at it, but I can tell you one bug
> that's still there (that I mentioned ages ago when this
> was under discussion before) ...
> 
> You need this patch (to bsd.pkg.mk) at the very least (you want to
> do "normal" stuff either if the ftp command isn't "ftp" or if there
> are no resume args set, not only when both of those is true).
> 
> Index: bsd.pkg.mk
> ===================================================================
> RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.mk,v
> retrieving revision 1.1540
> diff -u -r1.1540 bsd.pkg.mk
> --- bsd.pkg.mk	17 Nov 2004 22:55:14 -0000	1.1540
> +++ bsd.pkg.mk	24 Nov 2004 09:01:26 -0000
> @@ -1520,7 +1520,7 @@
>  		break;							\
>  	else								\
>  		if [ "$$dsize" -lt "$$tsize" ]; then		\
> -			if [ "${FETCH_CMD:T}" != "ftp" -a -z "${FETCH_RESUME_ARGS}" ];
> then \
> +			if [ "${FETCH_CMD:T}" != "ftp" -o -z "${FETCH_RESUME_ARGS}" ];
> then \
>  				${ECHO_MSG} "=> Resume transfers are not supported,
>  				FETCH_RESUME_ARGS is empty."; \
>  				break;					\
>  			else						\
> 

But this is what I wanted, because by default FETCH_CMD uses ftp 
(mk/default/mk.conf contains the following):

 .if ${FETCH_CMD:T} == "ftp"
FETCH_RESUME_ARGS?=     -R
.else
FETCH_RESUME_ARGS?=     # empty
.endif

With your patch, if FETCH_CMD is not defined as "ftp" and you have
FETCH_RESUME_ARGS defined, always will fail because the first check
${FETCH_CMD:T} != "ftp" is true.

Thanks for your comments.


--Signature=_Wed__24_Nov_2004_16_37_56_+0100_vJIc0DI=c6qLcLVP
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iD8DBQFBpKrUypkLYVDran0RAuJtAKC9KqPw3db8S8/7XmYIcvp5kQd9JACgirPc
Ology2Ydbyc470gA+9o7m9I=
=eJC2
-----END PGP SIGNATURE-----

--Signature=_Wed__24_Nov_2004_16_37_56_+0100_vJIc0DI=c6qLcLVP--