pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/26448



On Wed, 24 Nov 2004 16:05:23 +0700
Robert Elz <kre%munnari.OZ.AU@localhost> 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.

Attachment: pgpc3CVxmVJ9Y.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index