[dev] Re: A coding challenge wants you

Ariel asgnucash at dsgml.com
Mon Mar 19 23:36:10 EDT 2007


On Mon, 19 Mar 2007, vr.sundar wrote:

> I did but not in detail. I think I need to understand wget better.A
> quick look at the man page did make things any clearer for me
> specifically why is it trying to truncate the file. Fyi, this is a
> sample error msg:
>
> 17:58:53 (6.91 KB/s) - Connection closed at byte 3087945. Retrying.
>
> --17:58:53--  http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.10/gtk+-2.10.9.zip
>  (try: 2) => `c:/Sundar/projects/gnucash/tmp/gtk+-2.10.9.zip'
> Reusing connection to ftp.gnome.org:80.
> HTTP request sent, awaiting response...
>
> Continued download failed on this file, which conflicts with `-c'.
> Refusing to truncate existing file
> `c:/Sundar/projects/gnucash/tmp/gtk+-2.10.9.zip'.

What this means is: you told it continue downloading from where it left 
off, but the file that it got from the server is smaller then the one on 
the disk. Another possibility is that the server says the file is 
100bytes, but after 90bytes it closes the connection. If you ask for byte 
90-100 the server give an error message. Obviously the server has a bug.

Wget doesn't know what to do - should it shorten the existing file? Should 
it download the entire file again? So it reports to you that it just left 
the file alone, but that you should be aware the file on disk does not 
match the one you are trying to download. Or that the file is not the same 
as the expected size.

If you didn't use -c, it would download the file and give it a different 
name (adding a .1 usually). But -c means don't create those files, only 
affect the existing one - which is good, since the code that called wget 
would never look for a .1 file.

> Since the build seems to like my system's memory, I decided to feed
> the hungry beast and get some more :).

Why doesn't it use swap space? Create a massive swap file (4GB if you 
can), and see what happens.

 	-Ariel


More information about the gnucash-devel mailing list