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

Bug#817803: please specify metadata-by-hash



On Thu, Mar 10, 2016 at 03:33:12PM +0100, Peter Palfrader wrote:
> apt supports content-addressed metadata files (Translations, Packages, Sources, ..).
> 
> With this feature, we can have significantly more robust Debian mirrors.
> 
> Please provide a spec of what apt expects from the archive so our friendly
> ftpteam can implement this archive side.

I know this doesn't replace a proper spec, but if it's helpful, here's
the code I wrote this week at work to implement the archive side of this
in Launchpad (all AGPLv3):

  https://code.launchpad.net/~cjwatson/launchpad/db-archive-index-by-hash/+merge/289372
  https://code.launchpad.net/~cjwatson/launchpad/archive-file-model/+merge/289376
  https://code.launchpad.net/~cjwatson/launchpad/ds-publish-by-hash/+merge/289377
  https://code.launchpad.net/~cjwatson/launchpad/archive-index-by-hash/+merge/289379

Obviously a lot of this consists of Launchpad specifics such as the
librarian (our large blob storage service) and details of our database
and test setup, but perhaps things like the core algorithm in
Publisher._updateByHash will be of some use.

Note that at the time of writing this is still pending code review, and
I also haven't actually integration-tested it against apt, although I
believe it matches what apt-ftparchive produces; obviously I'll do
proper integration tests on it before inflicting it on the world.

-- 
Colin Watson                                       [cjwatson@debian.org]


Reply to: