On Thu, Sep 07, 2006 at 05:07:07PM +0200, Goswin von Brederlow wrote: > Peter Colberg <[EMAIL PROTECTED]> writes: > > > + system_redirect_io("gunzip", "$tempdir/$subdir/$list.diff/$file.gz", > > "$tempdir/$subdir/$list.diff/$file"); > > + system("patch --ed $tempdir/$subdir/$list > > $tempdir/$subdir/$list.diff/$file"); > > + unlink("$tempdir/$subdir/$list.diff/$file"); > > Any objections to > > system("gunzip < "$tempdir/$subdir/$list.diff/$file.gz" | patch --ed > $tempdir/$subdir/$list"); > > 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.
No objections at all (except following Bob's portability hint). I neglected to further simplify above code, which allowed for plugging in the RRED method as an alternative. (Later on, I discovered a subtle difference between 'patch --ed' and the perl-implemented RRED method. patch seems to put the whole file into memory before or while editing, which poses a big problem for a 32Mb RAM-only device. However, this will in no way affect any real world Debian use case.) Regards, Peter -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]