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

Reorganizing the library



Hello,

Times are changed since the first libapt has been written, C++ got
better, package metadata has changed as well.

I'm involved in all this because of debtags, and I recently started
writing, as part of debtags, a library to uniformly access package
metadata from different sources (APT and Debtags are supported at the
moment, but it would be easy to add popcon, debfoster/aptitude extended
status and other things).

I talked a bit with Matt here in London about reorganizing things, and I
started thinking about library design.  Matt then asked to write here
what I came up with.

One problem of libapt that I see is that it does too many things: access
the APT on-disk database, doing dependency computations, a concurrent
multiprotocol downloader, a rfc822 parser and probably more.  This makes
the library complex and hard to work with.

There are various projects that are working with package metadata in a
way or another, and quite some duplication of efforts.  I made a small
census in http://wiki.debian.net/index.cgi?PackageDatabase (please add
and correct if you feel so).

I'd like to unify a bit all of these efforts, creating some library that
could actually be used and wrapped by other scripting languages,
providing uniform access to various metadata sources and if possible a
more comfortable API than we have now.

I'm considering proceeding by splitting the library in its current
components, possibly making them self-containing or reusing existing
parts where available:

 - libapt-parser which provides RFC-822 parsing
 - libapt-pkgindex which provides low-level access to the APT on-disk
   database
 - libapt-debtags which provides low-level access to the Debtags on-disk
   database
 - libapt-acquire which implements acquiring files from sources
 - libapt-admin which provides infrastructure to download, update,
   re-generate the various on-disk databases
 - libapt-package which provides high-level, database independent access
   to package informations (fishing from APT, Debtags, whatever)
   and possibly implement package groups and versions/dependency
   computations

I don't mind rewriting myself some parts of libapt-pkg, although I'd at
least need some help in understanding how some more hairy things work.

I'd start with libapt-pkgindex, so that I can get knowledge on what's on
that on-disk binary index, then possibly using libapt-pkgindex in
libdebtags, and then moving on from there.

I'm posting to hear comment and suggestions, and to see if there are
other people interested in working with me.  I wouldn't mind also people
funding me on this, since it may require quite some time and I
currently don't have an income.


Ciao,

Enrico

--
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <enrico@debian.org>

Attachment: signature.asc
Description: Digital signature


Reply to: