Day 3: Conference: The Debian Packaging System Infrastructure for Linux



Wichert Akkerman, Debian Project Leader, gave us an introduction to dpkg

[picture]

The main goal for dpkg was to create a package format that is readable without having dpkg itself. A package is an ar file which contains a debian-binary, a control.tar.gz file and a contents.tar.gz
Control contains the metadata, which is the name, the version, the dependencies, description and other related info.

Among the metadata, you have the maintainer scripts, preinst, postinst, prerm, and postrm to do the right things as packages are being installed and removed.
New additions are config (debconf which lets you do all user interaction at the same time), template (debconf defaults), and trigger (rebuilding man page indexes at package install time for instance can be slow, so trigger lets you delay that).

Dpkg is the low level tool used to manipulate packages and manage the package status information. Dpkg calls dpkg-deb to do the actual work with debian packages, which allows for other other formats like dpkg-rpm

The dpkg database (/var/lib/dpkg) contains available, status, diversions which are all 3 text files and the alternatives directory.
Status stores both the current and wanted state of a package. It has a copy of the package control information for installed packages: wanted state (unknown, install, hold, deinstall, purge), error state (ok, reinstreq), current state (not-installed, unpacked, half-configured, installed, half-installed, config-files)

libapt-pkg tries to make sure that complex upgrades work correctly, which can be iffy when you upgrade C libraries.
libapt also has the code to retreive packages from multiple sources (file, http, ftp, cdrom, ...)

Dselect is the old install tool, which isn't very user friendly. Wichert calls it a "failed experiment in C++". Most people simply use apt instead, even though it doesn't have a GUI frontend.

dpkg-divert lets you tell dpkg to move new files from installed packages to another name so that it doesn't modify some local version you might have.
update-alternatives lets you change the symlink for a function program like editor can point to the program of your choice.

Making packages:

What you want to do is:

[library] Picture library [back] Back to Main Page [next] Next page


[ms free site] Email
Link to Home Page

2001/01/28 (15:22): Version 1.0