Goswin von Brederlow wrote:
> Any objections to
> 
> system("gunzip < "$tempdir/$subdir/$list.diff/$file.gz" | patch --ed 
> $tempdir/$subdir/$list"); 

A very, very small thing.  It is every so slightly more portable to
use 'gzip -d' than to use 'gunzip'.  (And yes, I hit having gzip
available but not gunzip available in a situation unrelated to Debian
just this last week.  Arg!  Sigh.)

  system("gzip -dc "$tempdir/$subdir/$list.diff/$file.gz" | patch --ed 
$tempdir/$subdir/$list"); 

But for Debian this is not critical.

> It won't detect a gunzip failure properly but
> 
> 1) that should never happen
> 2) the SHA1/md5sum of the Index file will not match and the full file
> will be fetched to correct the problem
> 
> So no harm done.
 
You analysis of the error recovery seems fine to me.  But the final
error code indicating most failures /could/ be checked, if desired.

  system("gzip -dc "$tempdir/$subdir/$list.diff/$file.gz" | patch --ed 
$tempdir/$subdir/$list") == 0
    or warn "Error: gzip piped to patch: patch application failed: $!\n";

Bob


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to