Package: debhelper
Version: 9.20160115
Severity: important
Tags: patch

As predicted in the discussion in #747141, the current implementation for
the link-doc option, in compat +< 9, only causes warnings that no one notices
and results in warnings in build logs that no one will read and broken
packages as described in #811433.

As discussed on IRC, I think that the current behavior is just broken and
needn't wait for a compat bump.  With the attached patch broken packages will
FTBFS when the arch all packages are built.  I think this is a reasonable way
to do it since it is the arch all package with the wrong depends.

I did test this and it failed in the arch all -> any case and does not fail
for arch any -> arch any.

Scott K
diff -Nru debhelper-9.20160115/debian/changelog debhelper-9.20160116/debian/changelog
--- debhelper-9.20160115/debian/changelog	2016-01-15 20:28:44.000000000 +0000
+++ debhelper-9.20160116/debian/changelog	2016-01-19 12:35:22.000000000 +0000
@@ -1,3 +1,13 @@
+debhelper (9.20160116) UNRELEASED; urgency=medium
+
+  * Change dh_installdocs --link-doc functionality, regardless of compate, so
+    an error is generated when there is an architecture mismatch between the
+    two packages in order to preclude misuse of --link-doc breaking
+    binNMUability of packages (See #811433 for an example of the behavior this
+    change prevents) 
+
+ -- Scott Kitterman <sc...@kitterman.com>  Tue, 19 Jan 2016 12:30:19 +0000
+
 debhelper (9.20160115) unstable; urgency=medium
 
   * Fix brown paper bag bug that caused many packages to
diff -Nru debhelper-9.20160115/dh_installdocs debhelper-9.20160116/dh_installdocs
--- debhelper-9.20160115/dh_installdocs	2016-01-14 19:49:48.000000000 +0000
+++ debhelper-9.20160116/dh_installdocs	2016-01-19 12:37:12.000000000 +0000
@@ -178,11 +178,7 @@
 		getpackages('both') unless $called_getpackages++;
 
 		if (package_arch($package) ne package_arch($dh{LINK_DOC})) {
-			if (compat(9)) {
-				warning("WARNING: --link-doc between architecture all and not all packages breaks binNMUs");
-			} else {
-				error("--link-doc not allowed between ${package} and $dh{LINK_DOC} (one is arch:all and the other not)");
-			}
+			error("--link-doc not allowed between ${package} and $dh{LINK_DOC} (one is arch:all and the other not)");
 		}
 		# Make sure that the parent directory exists.
 		if (! -d "$tmp/usr/share/doc" && ! -l "$tmp/usr/share/doc") {

Reply via email to