[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#128818: [patch] packages.gz diff support for apt



On Tue, Nov 23, 2004 at 08:17:43PM +0100, Jeroen van Wolffelaar wrote:
[..]
> This is avoidable:
> Every time a new packages file comes available, calculate diff -e (ed
> script) of the old and today's packages file. As a bonus, this is also
> smaller since deletions are simple ranges, and not included in the
> 'patch'.
> 
> Then, for each existing Packages.<md5sum>.diff.gz, append the thusly
> calculated edscript. It will result in a new edscript that transforms
> the packages file with <md5sum> as md5sum into the most current one.
> 
> Applying the ed script in-place goes like this:
> $ ( zcat $patch ; echo w ) | ed Packages
> 
> md5sum can (should?) be checked afterwards of course, multiple
> possibilities here. You could append the md5sum as ed comment in the ed
> script, for example, which will not make apt do any additional download
> -- this way, a Packages file update requires exactly one download, and
> two md5sum calculations client-side (one before to determine filename,
> one after to verify). 

I very much like the idea of having only one --ed script patch. It
will make the patch easier as the looping in no longer
needed. Embedded the final md5sum as a ed-comment in the first line
sounds like the way to go to me. We definitly want to check the md5sum
afterwards. If it does not match we can fallback to the Packages.bz2/gz.



thanks,
 Michael

-- 
The first rule of holes is: when you find yourself in one, stop digging. - PJ
Linux is not The Answer. Yes is the answer. Linux is The Question. - Neo



Reply to: