Subject: Re: pkg building and broken FTP sessions
To: John Klos <>
From: Alistair Crooks <>
List: tech-pkg
Date: 07/05/2004 08:29:21
On Mon, Jul 05, 2004 at 03:14:18AM -0400, John Klos wrote:
> >>So, if ftp doesn't create or if it properly destroys the file after the
> >>error, then pkgsrc would move along to the next ftp / http site.
> >
> >The same problem occurs when the ftp transfer is interrupted with only
> >a partial file transferred.  Maybe there should be a command line option
> >to ftp to "delete any partially downloaded files" or something.
> In the context of fetching files for a pkgsrc build, it would be a simple 
> matter to see if ftp returns an error on exit and have an option about 
> what to do in case of that error (like delete the distfile, if it exists).

Last time I looked, the exit value from ftp(1) was 0 in circumstances
like these. This meant that and the infrastructure has to
check for correct reception of the whole distfile, not ftp(1).

You can set FAILOVER_FETCH in mk.conf or in the environment or on the
command line, and the checksum on the distfiles will be used to ensure
that the correct distfile has been fetched.

This was added in September 1998, and is used by the bulk build mechanism
to get the correct distfile downloaded.