Package: pkg-kde-tools Version: 0.15.29 Severity: important Tags: patch Hi,
while making local backports of Qt5 for Debian stable, I noticed the following messages in one of the build logs (the one for qtquickcontrol2-opensource-src to be precise): ------------------ dpkg-gencontrol: warning: Depends field of package qml-module-qtquick-controls2: unknown substitution variable ${qmlc:Depends} dpkg-gencontrol: warning: Depends field of package qml-module-qtquick-controls2: unknown substitution variable ${qmlc:Depends} dpkg-gencontrol: warning: Depends field of package qml-module-qt-labs-calendar: unknown substitution variable ${qmlc:Depends} dpkg-gencontrol: warning: Depends field of package qml-module-qt-labs-calendar: unknown substitution variable ${qmlc:Depends} ------------------ Checking against the logs from the Debian buildds showed that they were also present there, so it wasn't just an artifact of my backporting. What was strange about the messages was that the package in question actually contains .qmlc files and correctly calls dh_qmlcdeps, so the variables really should have been set. Further investigation showed that there is a serious bug in dh_qmlcdeps that makes it stop processing as soon as it encounters the first binary package without any .qmlc files. Within the main loop over all packages, right after the find, in line 79 there is a check if any $qt_version_bin has been found while searching for .qmlc files, and it just exit()s when there wasn't any: ------------------ $qt_version_bin or exit(0); ------------------ The attached patch fixes that by just continuing with the next loop iteration instead of exiting. What makes this bug important (I actually contemplated calling it "serious") is that all binary packages built with the buggy dh_qmlcdeps (the bug existed right from when it was introduced in version 0.15.26) now potentially contain incorrect dependencies, and might have to be rebuilt. Affected packages should all have similar warnings to the above in their respective build logs though, so there might be some way to check for packages needing a rebuild. I don't know enough about the buildd infrastructure, so I can't tell if there's a way to do what's essentially a large-scale grep across all build logs. Regards, Andreas Ferber
>From c19dca9669ec21358793c38699be95cb528fe0a6 Mon Sep 17 00:00:00 2001 From: Andreas Ferber <af+debian-bugregpo...@chaos-agency.de> Date: Wed, 8 Aug 2018 20:44:44 +0200 Subject: [PATCH] dh_qmlcdeps: don't exit on first package without qmlc files. --- dh_qmlcdeps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dh_qmlcdeps b/dh_qmlcdeps index 0b86df4..59b2de6 100755 --- a/dh_qmlcdeps +++ b/dh_qmlcdeps @@ -75,7 +75,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { } }, $tmpdir); - $qt_version_bin or exit(0); + $qt_version_bin or next; my @qt_version = unpack("C4", $qt_version_bin); my $qt_version_str = "$qt_version[2].$qt_version[1].$qt_version[0]"; $qt_version[2] == 5 or error("Qt version $qt_version_str is not supported"); -- 2.11.0