next up previous contents
Next: Caching the virtual tree Up: Design choices Previous: Package managers common interface   Indice

Dealing with Debian APT

PkgDebian is a real class that implements PkgManager virtual methods. It has been built to deal directly with the APT package manager. At the moment Debian GNU/Linux is the only distribution supported by PackageFS.

The challenge of PkgDebian consists in performing mostly package operations without the help of other APT tools. Only apt-get should be needed in order to carry out last packages installation and removal steps. To achieve its goal this class is strongly based on APT library and so, it requires header files incorporated into libapt-pkg-dev package. The first difficulty in developing this part lay in understanding library objects and their own functions. The documentation provided with libapt-pkg-doc is very poor, so that I had to look in depth at the bare APT tools source code. Over again we notice the importance of source code availability and the opportunity to study from it. We learnt to retrieve many information from APT cache, and to do every check we needed (see section 5.3.4).

In this phase we met with the obstacle represented by package
configuration-time questions. Among studied package managers, the Debian one is the most interactive: each install operation is composed of unpacking and setting-up phases. A tool called debconf manages the second one. When debconf itself is set-up (someone surely does this operation while installing Debian GNU/Linux system), the administrator must set the interface to be used for configuring packages. He has to choose one of the following frontends:

The critical point still resides in daemon input and output (I/O) activities. A daemon must never perform standard I/O operations. Thus, dialog and readline interfaces must not be used, since they act through standard I/O. Other frontends are allowed: the noninteractive one obviously solves the problem, even if default settings sometimes do not fit user needs. If we are running an X session, the best solution is represented by gnome and kde interfaces (the first one is represented in figure 4.3), because they perform their requests in a new window. Thus, text-mode users experience some limitations. They can bypass this problem reconfiguring packages by themselves with the specific dpkg-reconfigure tool, but they have to do this operation also for each dependency installed with the package. In section 6.4 we are going to propose a solution to solve this problem with the help of the FUSE module implementation.

Figura 4.3: Debconf with the gnome frontend.
\includegraphics{immagini/gdebconf.eps}


next up previous contents
Next: Caching the virtual tree Up: Design choices Previous: Package managers common interface   Indice
2004-11-19