Chapter 3. Advanced usage

3.1. How Lintian works

Lintian is divided into the following layers:

frontend

the command line interface (currently, this layer consists of two scripts, namely lintian and lintian-info)

checks

a set of modules that check different aspects of packages.

data collectors

a set of scripts that prepares specific information about a package needed by the check modules

When you check a package with Lintian, the following steps are performed (not exactly in this order—but the details aren't important now):

  1. An entry is created for the package in the laboratory (or just lab).

  2. Some data is collected about the package. (That is done by the so-called data collector scripts.) For example, the file program is run on each file in the package and the output is stored in the lab.

  3. The checks are run over the package and report any discovered policy violations or other errors. These scripts don't access the package contents directly, but use the collected data as input.

  4. Depending on the lab mode Lintian uses (see below), the whole lab directory is removed again. If the lab is not removed, parts of the data collected may be auto cleaned to reduce disk space.

This separation of the check from the data collector scripts makes it possible to run Lintian several times over a package without having to recollect all the data each time. In addition, the checker scripts do not have to worry about packaging details since this is abstracted away by the collector scripts.