[lokisetup] some patches for patch and update

Stéphane Peter megastep at megastep.org
Sun Mar 23 19:33:25 EST 2003

Great! I'll apply those to i.o CVS ...

Le dim 23/03/2003 à 06:56, John Quigley a écrit :
> Here are some patches that came out of my use of setup/update/patch.  Do what 
> you will with these ;)
> lpatch-errorfix.patch:
> - fixed compiler error due to changed interface in setupdb
> lupdate-prefix.patch:
> - changed some hardcoded ".loki" strings to LOKI_DIRNAME 
> lupdate-productfix.patch
> - fixed bug with loki update when you specify product on command line.  It was 
> using "PRODUCT" and not "product", which caused it to check for updates to 
> itself instead of your desired product.
> lupdate-snarfhttp.patch
> - Fixed bug in snarf. If you use loki update to download a patch, and the 
> whole patch comes down but the patch fails, the next time you run loki update 
> for the same patch you will get a cryptic http error.
> The problem is that when snarf tries to resume a download but it already has 
> all the bytes for the file, it passes up a Range header that causes the 
> server to respond with "416 Requested range not satisfiable".  Snarf treats 
> this like an fatal error, but I don't think it is.  Wget, which passes up the 
> exact same range header in this case, does not treat it as such.  The http 
> spec seems a bit unclear on this.
> I solved the problem by modifing http.c so that if it gets a 416, it 
> checks the content range header for the file size.  If it is the same as the 
> local cached file size, it does not treat it as an error.  
> I sent this patch to the maintainer of snarf but the mail got bounced.

Stephane Peter
Sr. Software Engineer
Codehost, Inc.

More information about the Lokisetup mailing list