Subject: Re: 'make fetch' and partial downloads
To: David Brownlee <>
From: Frederick Bruckman <>
List: tech-pkg
Date: 07/19/2001 08:05:10
On Thu, 19 Jul 2001, David Brownlee wrote:

> 	If 'make fetch' fails part way through a download we are left with
> 	a partial file which breaks the checksum and has to be manually
> 	removed before continuing.

Is that a problem? When it happens to me, I just "pd distfiles", "ls
-alrt" shows the incomplete file at the bottom, "rm" that, and "popd".

I like to use "make checksum" as a normal user to download distfiles,
and "make package" as root to build, as I find it annoying when pkgsrc
starts building stuff when I only want to download, and vice-versa.
It's probably a bug that "make checksum" doesn't check dependencies,
but I like it, and I'd hate to see it get swept away with a re-write
of the fetch/checksum targets.

> 	What do people think about changing the 'make fetch' target to
> 	download to a temporary file and rename after download is
> 	complete? Would we want to use a fixed name per distfile
> 	(eg: ${distfile}.downloading)?

I'm sorry, but I don't see the point. It seems to add complexity for
no real gain, plus it also seems that you'd lose information (the
mtime of the distfile, which is useful for singling out the incomplete
distfiles, at least).

Possibly more useful would be a target that checksums the distfile
first, then deletes the file and runs "make checksum" if it doesn't
match. I don't know if you'd want to make that the default for "fetch"
-- probably not.