fetch fails, ftp works question

Ion-Mihai Tetcu itetcu at apropo.ro
Mon Feb 2 06:02:39 PST 2004


On Mon, 02 Feb 2004 15:02:40 +0200
Nelis Lamprecht <nelis at 8ball.co.za> wrote:

> On Mon, 2004-02-02 at 14:25, Ion-Mihai Tetcu wrote:
> > Hi,
> > 
> > I have the feeling this is in some FAQ, but I don't understand it.
> > 
> > I have a ftp server on which I have the distfiles and I'm using it
> > as
> > MASTER_SITE_OVERRIDE=ftp://user:pass@host/pub/FreeBSD/ports/distfil
> > es/${DIST_SUBDIR+DIST_SUBDIR/}
> > 
> > It usually work ok on make fetch. But sometimes it doesn't, e.g.
> > fetch
> > ftp://user:pass@host/pub/FreeBSD/ports/distfiles/MailScanner-4.25-14.tar.gz
> > fetch:
> > ftp://user:pass@host/pub/FreeBSD/ports/distfiles/MailScanner-4.25-14.tar.gz:
> > File unavailable (e.g., file not found, no access)
> > 
> > However the following works:
> > ftp
> > ftp://user:pass@host/pub/FreeBSD/ports/distfiles/MailScanner-4.25-14.tar.gz
> > 
> > Can somebody enlighten me ?
> 
> Try using the FTP_LOGIN and FTP_PASSWORD variables.

The odd thing is that for some ports it works and for some it doesn't,
so I don't think is an authentication problem.

> If all else fails you can try the FETCH_CMD variable in /etc/make.conf
> and change it to use ftp, wget etc.

Yes, I'm trying that also; the problem is that, if I use:
FETCH_CMD=/usr/bin/ftp
FETCH_BEFORE_ARGS=-v
some fetching fails because ftp gets passed an -S option (I presume for
the files that have the new SIZE in the distinfo). The same for axel,
etc.
The hole infrastructure is based on the assumption 
FETCH_CMD=/usr/bin/fetch
( and FETCH_BEFORE_ARGS=ARr )
and I found no way to override passing '-S'.

> Oh, not sure if that was a typo above but it should be:
>  MASTER_SITE_OVERRIDE?=
> ftp://user:pass@host/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/

Why ? 

${DIST_SUBDIR+DIST_SUBDIR/} will expand in DIST_SUBDIR with an ending
'/' if $DIST_SUBDIR is set and will be blank otherwise. If I use
${DIST_SUBDIR}/ the ending slash will be added even if the distfile is
in /usr/ports/distfiles/ (== pub/FreeBSD/ports/distfiles/) e.g.
pub/FreeBSD/ports/distfiles//my_distfile and the fetch will fail. 

Theoretically on the 'host' machine I should have all the distfiles, so
I want all downloads to be made from there. I don't remember what the
'?=' means.

Thanks,

-- 
IOnut
Unregistered ;) FreeBSD user


More information about the freebsd-questions mailing list