I guess the easiest thing to do is simply to warn and in future compat levels to error out with something like:
diff --git a/dh_installdocs b/dh_installdocs index 3eefcdf..4ccd373 100755 --- a/dh_installdocs +++ b/dh_installdocs @@ -166,6 +166,14 @@ foreach my $package (@{$dh{DOPACKAGES}}) { my $link_doc=($dh{LINK_DOC} && $dh{LINK_DOC} ne $package); if ($link_doc) { + # TODO: does this need getpackages to be called first? + 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 all and the other not)"); + } + } # Make sure that the parent directory exists. if (! -d "$tmp/usr/share/doc" && ! -l "$tmp/usr/share/doc") { doit("install","-g",0,"-o",0,"-d","$tmp/usr/share/doc"); Everything additional looks like it would have or cause quite some problems: - erroring out now breaks even the normal non-binNMU cases - replacing the dependency with another version in case all->non-all link is not possible. - replacing the dependency with another version in case non-all->all link gets complicated by the possibility of having different versions for different packages. (and then results in a package nowhere having the changelog for the binNMU, so many complications and special cases for a not-really-solution). - ignoring --link-doc if the packages have different arch:all-ness might also have some nasty side-effects. And doing that only if there in an bin-NMU case would be quite suprising and likely not that much better than now. - aborting with an error in case there is a broken --link-doc and there is an binNMU currently happening has the problem of detecting that the dependency is actually affected (due to binary packages maybe having differing versions) and could perhaps break some binNMU that by some other hard to forsee factors perhaps would not create a broken package. Of those at most erroring out in case of binNMU that is considered to create uninstallable packages seems worth considering to me, and making that good enough to not create new problems looks hard. Bernhard R. Link -- F8AC 04D5 0B9B 064B 3383 C3DA AFFC 96D1 151D FFDC -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org