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

Bug#920878: lintian: please check for missing Build-Depends: qt5-qmake:native when using lrelease



Package: lintian
Version: 2.5.124
Severity: wishlist
User: helmutg@debian.org
Usertags: rebootstrap

A number of qt-related projects manage their translations using
lrelease. The current packaging of qmake implies that lrelease only
works when you have a native qmake installed. When you only have a
foreign qmake (e.g. due to Build-Depends: qt5-qmake), lrelease prints an
error message and exists successfully. Arguably, this is a policy 4.6
violation. Sometimes it is noted due to missing files at dh_install
time. Other times, one gets a broken build.

In a discussion with Lisandro and Dmitry, we packages that use lrelease
are a minority. Therefore they should simply add qt5-qmake:native to
Build-Depends. This is a simple task once you know that it needs doing.

The question of when a package uses lrelease is harder. Assuming that
all packages build from source, we could search for
/usr/share/*/translations/*.qm in the resulting binary packages. So we
could conceive a lintian tag that fires on the presence of such a *.qm
file and the absence of qt5-qmake from any of
Build-Depends{,-Arch,-Indep}. Let me propose a tag description:

    The package installs qt translations and likely runs lrelease during
    build to generate them. Running lrelease requires a build dependency
    on "qt5-qmake:native", which is presently missing. If it doesn't run
    lrelease, the translations are not built from source and running
    lrelease manually is recommended.

Now such a tag requires lintian to look at the source and binary
packages simultaneously. Can lintian do that?

Helmut


Reply to: