[debhelper-devel] [debhelper] 01/02: dh_installdocs: Install use dir of mainpackage (C11)
Niels Thykier
nthykier at moszumanska.debian.org
Sat Jul 2 12:33:13 UTC 2016
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository debhelper.
commit 71007f72da682dd9d7f932d81ca2ecd5d46a0e70
Author: Niels Thykier <niels at thykier.net>
Date: Sat Jul 2 12:22:41 2016 +0000
dh_installdocs: Install use dir of mainpackage (C11)
In compat 11, use the directory of the mainpackage rather than the doc
package as recommended by Debian Policy 3.9.7.
Signed-off-by: Niels Thykier <niels at thykier.net>
---
debhelper.pod | 12 ++++++++++++
debian/changelog | 3 +++
dh_installdocs | 15 ++++++++++++---
3 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/debhelper.pod b/debhelper.pod
index ff6fa8d..bb28647 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -577,6 +577,18 @@ The B<-s> (B<--same-arch>) option is removed.
Invoking B<dh_clean -k> now causes an error instead of a deprecation
warning.
+=item -
+
+B<dh_installdocs> now installs user-supplied documentation
+(e.g. debian/I<package>.docs) into F</usr/share/doc/mainpackage>
+rather than F</usr/share/doc/package> by default as recommended by
+Debian Policy 3.9.7.
+
+If you need the old behaviour, it can be emulated by using the
+B<--mainpackage> option.
+
+Please remember to check/update your doc-base files.
+
=back
=back
diff --git a/debian/changelog b/debian/changelog
index e2a8ca9..fc0fca4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,9 @@ debhelper (9.20160618.1+unreleased) UNRELEASED; urgency=medium
most common case. (Closes: #829142)
* Dh_Lib.pm: Cope with the parallel options in make 4.2.
Thanks to Martin Dorey for the report. (Closes: #827132)
+ * dh_installdocs: In compat 11, install documentation into
+ /usr/share/doc/mainpackage as requested by policy 3.9.7.
+ Thanks to Sandro Knauß for the report. (Closes: #824221)
[ Translations ]
* Update German translation (Chris Leick + Eduard Bloch)
diff --git a/dh_installdocs b/dh_installdocs
index 6c924dd..a42a98d 100755
--- a/dh_installdocs
+++ b/dh_installdocs
@@ -27,6 +27,10 @@ documentation into F<usr/share/doc/package> in package build directories.
List documentation files to be installed into I<package>.
+In compat 11 (or later), these will be installed info
+F</usr/share/doc/mainpackage>. Previously it would be
+F</usr/share/doc/package>.
+
=item F<debian/copyright>
The copyright file is installed into all packages, unless a more
@@ -214,10 +218,16 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
if (@docs) {
+ my $target_package = $package;
my $exclude = ' -and ! -empty';
if ($dh{EXCLUDE_FIND}) {
$exclude .= ' -and ! \( '.$dh{EXCLUDE_FIND}.' \)';
}
+ if (not compat(10)) {
+ $target_package = $dh{MAINPACKAGE};
+ }
+ my $target_dir = "$tmp/usr/share/doc/$target_package";
+ install_dir($target_dir);
foreach my $doc (@docs) {
next if excludefile($doc);
next if -e $doc && ! -s $doc; # ignore empty files
@@ -227,14 +237,13 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
my $dir = ($basename eq '.') ? $doc : "$doc/..";
my $pwd=`pwd`;
chomp $pwd;
- my $docdir = "$pwd/$tmp/usr/share/doc/$package";
+ my $docdir = "$pwd/$target_dir";
complex_doit("cd '$dir' && " .
"find '$basename' \\( -type f -or -type l \\)$exclude -print0 | LC_ALL=C sort -z | " .
"xargs -0 -I {} cp --reflink=auto --parents -dp {} $docdir");
}
else {
- doit("cp", '--reflink=auto', "-a", $doc,
- "$tmp/usr/share/doc/$package");
+ doit("cp", '--reflink=auto', "-a", $doc, $target_dir);
}
}
doit("chown","-R","0:0","$tmp/usr/share/doc");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git
More information about the debhelper-devel
mailing list