Corrupted lintian installation using Debian images
Description
On CI jobs using the Debian base image, lintian is reported to be installed, but it's not: example.
Actual behavior
Lintian is reported to be installed, but the installation in fact is incomplete, missing all files under /usr/share/lintian
.
Expected behavior
It was expected that the Debian base image would produce a functional lintian installation.
Causes
The problem is caused by this line in the image build process.
It adds /usr/share/lintian/*
into dpkg
's list of excluded paths somewhere at /etc/dpkg/dpkg.cfg.d/
.
Workaround
A workaround is straightforward, consisting in passing -o Dpkg::Options::="--path-include=/usr/share/lintian/*"
to apt-get
when installing lintian
.
But this is sub-optimal, as users must be aware of the issue and manually implement the workaround.
Suggested fix
While it makes sense to exclude /usr/share/lintian/*
during the image build process, this path could be removed from /etc/dpkg/dpkg.cfg.d/
.
Minimum Reproducible Example
A minimalistic example is available in the lintianer repository, specifically in a pipeline with two jobs:
- The lintian job, with uses the Debian base image and tries to install lintian the usual way, which fails.
- The lintian-path-include job, which uses the Debian base image, but applies the workaround mentioned above, which succeeds.
Downstream bug
This problem was originally reported at tpo/onion-services/onionprobe#105 (closed).