Lintian is divided into the following layers:
lintian
and lintian-info
)
When you check a package with Lintian, the following steps are performed (not exactly in this order--but the details aren't important now):
file
program is run
on each file in the package and the output is saved in the
file-info
file in the lab.
This separation of the checker scripts from the unpacking tools and the data collector scripts makes it possible to run Lintian several times over a package without having to unpack the package each time. In addition, the checker scripts don't have to worry about packaging details since they just access the statistics files (not the package files directly).
Furthermore, since it is sufficient to save the statistics files of each package in order to run the checks, one can store these files for all packages of the Debian archive if one wants to check the whole distribution several times. (The current Debian archive contains about 1800 binary packages (architectures i386 and all) and about 1350 source packages. If all data is collected for all these packages, the lab requires only about 200 megabytes, while the actual packages would require over 1 gigabyte of disk space--in gzipped form!)
Lintian's laboratory directory can be defined via the LINTIAN_LAB variable (either in the configuration file or as environment variable). If this variable is not defined, Lintian creates a temporary lab in /tmp which is removed again after Lintian has completed its checks. This mode is called temporary lab mode.
In the static lab mode (if the laboratory directory is defined by the user), the laboratory has to be set up first before it can be used by Lintian. This can be done with the -S (or --setup-lab) command line option (see also the next section about the distribution directory).
Here is a sketch of the Lintian laboratory:
$LINTIAN_LAB/ source/ <src-pkg-name>/ .lintian-status dsc dsc file foo.diff.gz foo.orig.tar.gz (symlinks to actual files) binary/ <binary 1> -> ../../../binary/<binary 1> ... unpacked/ (opt., contains unpacked source package) binary/ <bin-pkg-name>/ .lintian-status index (output of `dpkg -c') control-index (same for the control.tar.gz of the pkg) control/ (contains all control files) fields/ (contains all control field settings) source -> ../../source/<source pkg> deb (symlink to actual file) unpacked/ (opt., contains unpacked binary package) info/ binary-packages list of binary packages in archive source-packages list of source packages in archive
If you want to check the full Debian distribution with Lintian, you have to set up the LINTIAN_DIST variable in the configuration file (or as environment variable). Then, you have to run lintian -S to set up the laboratory and to create lists of all binary and source packages in the distribution. (Note, that this might take some time...)
After that, you can either check single packages simply be running
$ lintian foo
(without path or extension for the package foo) or check the whole distribution with
$ lintian --all
Since Lintian needs an up-to-date list of packages in the distribution, you'll have to rerun the lintian -S command whenever the distribution directory has been changed. (But there is no need to remove the laboratory in this situation: Lintian is smart enough to only re-unpack packages that have been changed.)
schwarz@debian.org
dark@xs4all.nl
lintian-maint@debian.org