Bug#376596: lintian: please detect use of ${Source-Version} if an arch-indep package is created
Package: lintian
Version: 1.23.21
Severity: wishlist
Tags: patch
It might be worth dropping the outer conditional at some point, since
the variable is deprecated even when it is not necessarily harmful.
--- /tmp/fields 2006-07-02 17:43:06.000000000 -0400
+++ /usr/share/lintian/checks/fields 2006-07-02 17:43:18.000000000 -0400
@@ -536,6 +536,16 @@
tag "build-depends-indep-without-arch-indep", ""
if (-e "fields/build-depends-indep" && $arch_indep_packages == 0);
+ if ($arch_indep_packages!=0) {
+ open(FH, "debfiles/control") || next;
+ local $/;
+ my $s=<FH>;
+ foreach my $f ("Pre-Depends", "Depends", "Conflicts") {
+ $s =~ m/^$f:.*\${Source-Version}/im || next;
+ tag "Source-Version-substitution-can-cause-uninstallable-packages-after-binnmu", "$f";
+ }
+ }
+
my $is_dep_field = sub { grep { $_ eq $_[0] } qw(build-depends build-depends-indep) };
my %depend;
--- /tmp/fields.desc 2006-07-02 17:22:30.000000000 -0400
+++ /usr/share/lintian/checks/fields.desc 2006-07-02 17:48:06.000000000 -0400
@@ -583,3 +583,18 @@
Info: You use the Bugs field though the field value is the default
(debbugs://bugs.debian.org/). In this case the field is redundant and
should be removed.
+
+Tag: Source-Version-substitution-can-cause-uninstallable-packages-after-binnmu
+Type: warning
+Info: Traditionally, binary packages built from the same source
+ package might depend on ${Source-Version} of other binary packages
+ built by that source. However, this can cause problems with
+ Architecture: all packages if the source is ever scheduled for
+ automatic binary NMU (binNMU). Autobuilders never rebuild the Arch:
+ all packages, but add a "+bN" (for some integer N) suffix to the
+ Arch:version number. So the Arch: any packages would depend on the binNMU
+ version of the Arch: all packages, but no version of that package
+ would be created, and the Arch: any package would become
+ uninstallable. The typical solution is to use ${source:Version}
+ instead, which strips any +bN suffix from the version. See
+ dpkg-source(1) for more information.
Reply to: