Bug#128818: [patch] packages.gz diff support for apt
On Wed, Nov 24, 2004 at 04:49:34AM +1000, Anthony Towns wrote:
> Michael wrote:
> > The code will download until it finds a empty patch, it assumes then
> > that the index is now up-to-date and stops. If it does not find a
> > patch it will auto-fallback to Packages.bz2 and then to
> > Packages.gz. The code is diffed against the arch repository at:
> > http://people.debian.org/~mdz/arch/apt@packages.debian.org
> > (apt@packages.debian.org/apt--main--0)
>
> FWIW, what I was considering last I looked at this (Dec 2003
> apparently...) was a combination of an index file and gzipped --ed
> diffs. The index file gives you a bit more control over your patches,
> and some redundancy so you can check if you've gotten everything screwed
> up; --ed style diffs happen to kick ass for this problem.
>
> So the index file I was imagining looked like:
>
> Canonical-Name: netstat.txt
> MD5-History:
> e43a9e356e65b79bde65ea8794594d9b 1934 2003-12-01-1259.10
> 68ad5015da0dbd75b83ae03ea68c0fbd 1934 2003-12-01-1259.44
> 51d331edc38ba522a1c95002e6ee91c9 2096 2003-12-01-1300.19
> 11d476ccadd18072dfbb6d6907274b8b 1853 2003-12-01-1300.53
> ae1076d482f0376ee86c2ee9c6342fd4 1691 2003-12-01-1301.27
> 756f08019c209eea1cc1fe0497ebd2f7 1691 2003-12-01-1302.01
> MD5-Patches:
> 1968c0ddf9761d0e6a8b1fa8766b32c8 882 2003-12-01-1259.10
> f3d6619a17d3065dee83bb3b6e328453 797 2003-12-01-1259.44
> 5f2791687760176a6d243f4da0f6757b 468 2003-12-01-1300.19
> fc22e01fc575d8f9dbb4d4cd1ef1fb2d 468 2003-12-01-1300.53
> b75d4c0b33d2a76284ed86c395a60192 461 2003-12-01-1301.27
> b4e2aa24bda367acc9f83740840e5bc1 461 2003-12-01-1302.01
I like this approach, and I think it's general enough to be useful beyond
apt. Maintaining an index like this avoids the problem of poking around
looking for the deltas when they're remote. For that reason, I think it
should be implemented separately, and then we can write an apt method to use
it.
Given a simple Python library doing the retrieval, I think this could be
folded into apt in a fairly straightforward way. The client side would need
a cache of old files to work with, and a URL for the new file to retrieve,
and it could handle the delta stuff transparently.
--
- mdz
Reply to: