Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 1996 19:04:34 +0000 (GMT)
From:      Adam David <adam@veda.is>
To:        jkh@time.cdrom.com (Jordan K. Hubbard)
Cc:        jkh@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-lib@freefall.freebsd.org, freebsd-ports@freebsd.org
Subject:   Re: cvs commit: src/lib/libftpio ftpio.c
Message-ID:  <199609101904.TAA12202@veda.is>
In-Reply-To: <20424.842376612@time.cdrom.com> from "Jordan K. Hubbard" at "Sep 10, 96 10:30:12 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> > I had FETCH_BEFORE_ARGS=-r and was almost finished fetching a file from the
> > master site, then the connection timed out and it refetched the file from
> > ftp.freebsd.org starting at offset 0.
> 
> Huh!  Can you try this more stand-alone?  It works in my tests. :-(

Oh, I think I see what's going on.

Two sites have different timestamps on the files, so when fetch(1) compares
them it thinks "different file" and starts over.

In the standalone case this is useful behaviour... but when multiple sites are
expected to contain the same file (though the actual filename may even differ),
this safety catch can get in the way.

> > A different but related problem is that 'make fetch' skips partially fetched
> > files because it thinks they have already been fetched successfully.
> 
> Not much I can do about that - if you want to save what you've
> transfered already, you have to save the file.  I don't see as how
> ports could know a good one from a bad one.  I guess the other
> alternative would be to go to a temporary file all the time with
> fetch, only moving the file over it's been fully fetched.

It could be checksummed and assume a partial transfer if there's a mismatch.
Of course, a simple size check would suffice and would likely be more accurate
for this purpose, but we are not storing file sizes.

A quick Makefile hack would be to flag the file in some way if the transfer
does not complete normally, for instance by setting its mode or timestamp to 0.
'make fetch' could notice this next time round and take appropriate action.

We would still want it to be manually selectable whether to "get" or "reget"
the file, using the FETCH_BEFORE_ARGS mechanism only.

Adam



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609101904.TAA12202>