On 2016-07-09 09:40 +0000, Niels Thykier wrote: > Sven Joachim: >> On 2016-07-08 09:53 +0000, Niels Thykier wrote: >> >>> [...] >>> >>> Thanks, I have applied it to master and it will be part of the next >>> debhelper release. :) >> >> Unfortunately my patch breaks dh_installdocs in compat 11 mode, as I >> have just discovered. :-/ Will look into it, but I'm not too familiar >> with debhelper yet, and my perl skills are rusty. >> >> Cheers, >> Sven >> > > Thanks for the heads up. > > I will continue with your existing patch for now as it fixes packages > and nothing is using compat 11.
Attached is a patch which fixes both the original problem and the regression. It seems to me that dh_installdocs really needs a testsuite for all the possible cases though. Cheers, Sven
>From 771bc087dd518cefa5599aa5a1b67a39291a61a3 Mon Sep 17 00:00:00 2001 From: Sven Joachim <svenj...@gmx.de> Date: Sat, 9 Jul 2016 12:18:41 +0200 Subject: [PATCH] dh_installdocs: Fix regression in compat 11 mode The change in commit 863ef397c939340e863be1e96c822934a3167852 was not quite correct, since ensure_docdir would create the doc directory under debian/$dh{MAINPACKAGE} rather than debian/$package in C11 mode. Restore the previous code and fix the original problem in bug #830309 ("install: cannot change permissions of 'debian/$package/usr/share/doc/$package': No such file or directory") by only creating the directory if it is not already a symlink, as is the case with the --link-doc option. --- dh_installdocs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dh_installdocs b/dh_installdocs index 41e0883..d7bb24f 100755 --- a/dh_installdocs +++ b/dh_installdocs @@ -227,7 +227,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { $target_package = $dh{MAINPACKAGE}; } my $target_dir = "$tmp/usr/share/doc/$target_package"; - ensure_docdir($target_package); + install_dir($target_dir) unless -l $target_dir; foreach my $doc (@docs) { next if excludefile($doc); next if -e $doc && ! -s $doc; # ignore empty files -- 2.8.1