[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#983219: lintian: warn about incorrect DEB_BUILD_MULTIARCH usage



Package: lintian
Version: 2.104.0
Severity: wishlist

Nilesh Patra discovered a recurring error pattern affecting cross builds
of Debian packages. People tend to confuse DEB_BUILD_* variables with
DEB_HOST_* variables. In debian/rules, this is difficult to detect
reliably as there are legitimate uses of the DEB_BUILD_* variables.
However, there is one category of such uses that can be reliably
detected. Since dh-exec and later debhelper compatibility level >= 13, a
number of debian/ files support expansion of these variables. Using
DEB_BUILD_MULTIARCH is never correct in debian/*.install files nor is it
correct in debian/*.links files. Examples:

https://sources.debian.org/src/cubature/1.0.3+ds-3/debian/libcubature0.install/#L2
 -> Nilesh fixed this in -4.
https://sources.debian.org/src/mozc/2.26.4220.100+dfsg-2/debian/uim-mozc.install/#L2

Given that people get the distinction of build/host/target wrong and the
adoption of higher compat levels, it seems likely that more of these
will be introduced lateron.

A use of this variable should result in a lintian error.
DEB_HOST_MULTIARCH should be used instead of DEB_BUILD_MULTIARCH. I do
not expect false positives.

I'm Ccing Jelmer as this tag would be automatically fixable by
lintian-brush.

Helmut


Reply to: