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

Re: How to make Packages file 50% smaller



On 03/03/01 Marcus Brinkmann wrote:
> On Sat, Mar 03, 2001 at 12:00:00AM -0800, Alexander Hvostov wrote:
> > > You'd need a separate description file which you should download in
> > > any case (or read from a cd) whenever the Packages file changes. 
> > 
> > Is that a problem? Doesn't seem problematic to me...
> 
> Can you spell backward compatibility? If you feel the need for such a
> feature, you can do it with a Packages.stripped file or whatever, without
> stomping on other peoples feet. You seem to have no clue about what tools
> actually make use of the Packages file. You have already showed your
> ignorance with the Status file, too.
> Also please note that the Packages file format doesn't have a version number.

A simple and easy to implement mechanism could be as follows:
when a new Packages files needs to be written, the md5sum of the
old one is calculated, along with a diff. The diff is stored as
Packages.diff.actual_md5sum. The diff is always made against the last
Packages. Keeping old Packages files around or reverse-applying the
diffs, it's possible to create Packages.diff.* file for a few days.
The diff files will be stored compressed for up to n days.

When apt (or the other tools) needs to download the new Packages
file, it computes the md5sum of the packages it has in /var/state/apt
and tries to download Packages.diff.actual_md5sum and applies the
patch. If any step fails it can easily download the real Packages
file instead.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better



Reply to: