[Yum-devel] URLGrabber Batch Mode

Michael Stenner mstenner at linux.duke.edu
Sat Feb 28 17:40:19 UTC 2004


On Sat, Feb 28, 2004 at 12:21:26PM -0500, seth vidal wrote:
> 
> > Also, several users have requested a download resume feature.
> > Here is an example.  I found it in a python mailing list a few weeks ago
> > can't remember where so I can't give the author credit.
> 
> Something I've never been clear on. how do you judge b/t a stopped
> download and a corrupted download when doing regets?

I don't think it's possible in any simple or reliable way.  I think
there are two options when the local file is too small:
 
  a) don't ask question, just get it again
  b) reget, which consists of
       1) temporarily assume that it's correct, but incomplete
       2) download "the rest"
       3) do the checksum testing, etc for corruption, starting
          from scratch if it fails

Now, occasionally, we will spend time downloading "the rest" of a
broken file, which is a waste of time.  However, other times, we will
avoid having to re-download the front end of a terminated download.
If latter saves us more time than the former costs us, we win.

This is all assuming that we
  a) have some way of telling if a local file is "somehow broken", 
     via a checksum or something
  b) that we know how big the file is supposed to be

				-Michael
-- 
  Michael D. Stenner                            mstenner at ece.arizona.edu
  ECE Department, the University of Arizona                 520-626-1619
  1230 E. Speedway Blvd., Tucson, AZ 85721-0104                 ECE 524G



More information about the Yum-devel mailing list