Tuesday, October 24, 2006

Me on libpkg

I've been working on a library with the lofty goal of overthrowing all package management tools (and bringing peace to the masses of Open Source/Free Software users). Failing this I will accept making package tool writers jobs easier by providing an API to add/remove/create/modify packages on a system.

The library is aptly named libpkg. It is an object based design where each package is a separate object. The contents of the object is hidden from view. There are also package repository and package database objects, these are to download from and install packages to respectively. Files are abstracted too. This is mainly to make sure the code will be safe when run as the root user.

Currently libpkg can fetch and install a package and get a list of installed packages based on some criteria, eg. all packages, packages with a name matching a regular expression, etc. I am working on deinstalling packages with package creation next on my list.

Because libpkg uses Tim Kientzle's libarchive to extract files straight to the file system the speed of installation appears to be limited by the speed of libbz2.

If anyone is interested in working on this with me feel free to leave a comment or if you can find my Berlios email address you can email me (username: zxombie). It is currently FreeBSD specific but I would like to get it working on other Operating Systems.