[debhelper-devel] [debhelper] 02/02: dh_install*: Accept missing files for packages not built

Niels Thykier nthykier at moszumanska.debian.org
Sun Aug 6 14:57:54 UTC 2017


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository debhelper.

commit 7215e035497233aefd8350d00a1efa4a2a7157b6
Author: Niels Thykier <niels at thykier.net>
Date:   Sun Aug 6 14:56:40 2017 +0000

    dh_install*: Accept missing files for packages not built
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 debian/changelog   | 6 ++++++
 dh_installdocs     | 6 +++++-
 dh_installexamples | 8 +++++---
 dh_installinfo     | 8 +++++---
 dh_installman      | 8 +++++---
 5 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index df7cefa..0fd218f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,12 @@ debhelper (10.7.3) UNRELEASED; urgency=medium
   * dh_shlibdeps: Avoid forking a shell when calling file.
   * dh_shlibdeps: Avoid passing files with "newline" to
     subprocesses.
+  * dh_installdocs: Ignore missing files in compat 11 for packages
+    that are not processed (e.g. arch:all packages during a -B build).
+    Thanks to Jens Reyer for reporting the issue.  (Closes: #870892)
+  * dh_installexamples: Ditto.
+  * dh_installinfo: Ditto.
+  * dh_installman: Ditto.
 
  -- Niels Thykier <niels at thykier.net>  Thu, 03 Aug 2017 19:30:01 +0000
 
diff --git a/dh_installdocs b/dh_installdocs
index caa630f..1bee66e 100755
--- a/dh_installdocs
+++ b/dh_installdocs
@@ -185,8 +185,11 @@ init(options => {
 });
 
 my $called_getpackages = 0;
-my $error_handler = compat(10) ? \&glob_expand_error_handler_warn_and_discard : \&glob_expand_error_handler_reject;
+my $default_error_handler = compat(10) ? \&glob_expand_error_handler_warn_and_discard : \&glob_expand_error_handler_reject;
 my $nodocs = is_build_profile_active('nodoc') ? 1 : 0;
+# We cannot assume documentation is built under nodoc, but if it is we must flag it as handled
+# or dh_missing might make noise.
+$default_error_handler = \&glob_expand_error_handler_silently_ignore if $nodocs;
 
 foreach my $package (getpackages()) {
 	next if is_udeb($package);
@@ -196,6 +199,7 @@ foreach my $package (getpackages()) {
 	my $link_doc=($dh{LINK_DOC} && $dh{LINK_DOC} ne $package);
 	my $skip_install = process_pkg($package) ? 0 : 1;
 	my @search_dirs = ('.');
+	my $error_handler = $skip_install ? \&glob_expand_error_handler_silently_ignore : $default_error_handler;
 	@search_dirs = ($dh{SOURCEDIR} // '.', default_sourcedir($package)) if not compat(10);
 
 	if (not $skip_install) {
diff --git a/dh_installexamples b/dh_installexamples
index f11d1c5..cb44b67 100755
--- a/dh_installexamples
+++ b/dh_installexamples
@@ -78,11 +78,11 @@ init(options => {
 # PROMISE: DH NOOP WITHOUT pkgfile-logged(examples)
 
 my $pwd;
-my $error_handler = compat(10) ? \&glob_expand_error_handler_warn_and_discard : \&glob_expand_error_handler_reject;
+my $default_error_handler = compat(10) ? \&glob_expand_error_handler_warn_and_discard : \&glob_expand_error_handler_reject;
 my $nodocs = is_build_profile_active('nodoc') ? 1 : 0;
 # We cannot assume documentation is built under nodoc, but if it is we must flag it as handled
 # or dh_missing might make noise.
-$error_handler = \&glob_expand_error_handler_silently_ignore if $nodocs;
+$default_error_handler = \&glob_expand_error_handler_silently_ignore if $nodocs;
 
 foreach my $package (getpackages()) {
 	next if is_udeb($package);
@@ -90,6 +90,8 @@ foreach my $package (getpackages()) {
 	my $tmp=tmpdir($package);
 	my $file=pkgfile($package,"examples");
 	my @search_dirs = ('.');
+	my $skip_install = process_pkg($package) ? 0 : 1;
+	my $error_handler = $skip_install ? \&glob_expand_error_handler_silently_ignore : $default_error_handler;
 	@search_dirs = ($dh{SOURCEDIR} // '.', default_sourcedir($package)) if not compat(10);
 	
 	my @examples;
@@ -104,7 +106,7 @@ foreach my $package (getpackages()) {
 
 	log_installed_files($package, @examples);
 
-	next if not process_pkg($package) or $nodocs;
+	next if $skip_install or $nodocs;
 
 	if (@examples) {
 		install_dir("$tmp/usr/share/doc/$package/examples");
diff --git a/dh_installinfo b/dh_installinfo
index 1574394..477d4c9 100755
--- a/dh_installinfo
+++ b/dh_installinfo
@@ -63,16 +63,18 @@ init();
 
 # PROMISE: DH NOOP WITHOUT info
 
-my $error_handler = compat(10) ? \&glob_expand_error_handler_warn_and_discard : \&glob_expand_error_handler_reject;
+my $default_error_handler = compat(10) ? \&glob_expand_error_handler_warn_and_discard : \&glob_expand_error_handler_reject;
 my $nodocs = is_build_profile_active('nodoc') ? 1 : 0;
 # We cannot assume documentation is built under nodoc, but if it is we must flag it as handled
 # or dh_missing might make noise.
-$error_handler = \&glob_expand_error_handler_silently_ignore if $nodocs;
+$default_error_handler = \&glob_expand_error_handler_silently_ignore if $nodocs;
 
 foreach my $package (getpackages()) {
 	my $tmp=tmpdir($package);
 	my $file=pkgfile($package,"info");
 	my @search_dirs = ('.');
+	my $skip_install = process_pkg($package) ? 0 : 1;
+	my $error_handler = $skip_install ? \&glob_expand_error_handler_silently_ignore : $default_error_handler;
 	@search_dirs = ($dh{SOURCEDIR} // '.', default_sourcedir($package)) if not compat(10);
 
 	my @info;
@@ -85,7 +87,7 @@ foreach my $package (getpackages()) {
 		push @info, @ARGV;
 	}
 
-	next if not process_pkg($package) or $nodocs;
+	next if $skip_install or $nodocs;
 
 	if (@info) {
 		install_dir("$tmp/usr/share/info");
diff --git a/dh_installman b/dh_installman
index cfaa6bc..947abe6 100755
--- a/dh_installman
+++ b/dh_installman
@@ -141,11 +141,11 @@ init(options => {
 my (@sofiles, @sodests);
 my @all_packages = getpackages();
 
-my $error_handler = compat(10) ? \&glob_expand_error_handler_warn_and_discard : \&glob_expand_error_handler_reject;
+my $default_error_handler = compat(10) ? \&glob_expand_error_handler_warn_and_discard : \&glob_expand_error_handler_reject;
 my $nodocs = is_build_profile_active('nodoc') ? 1 : 0;
 # We cannot assume documentation is built under nodoc, but if it is we must flag it as handled
 # or dh_missing might make noise.
-$error_handler = \&glob_expand_error_handler_silently_ignore if $nodocs;
+$default_error_handler = \&glob_expand_error_handler_silently_ignore if $nodocs;
 
 on_items_in_parallel(\@all_packages, sub {
 
@@ -156,6 +156,8 @@ on_items_in_parallel(\@all_packages, sub {
 		my $file = pkgfile($package, "manpages");
 		my @manpages;
 		my @search_dirs = ('.');
+		my $skip_install = process_pkg($package) ? 0 : 1;
+		my $error_handler = $skip_install ? \&glob_expand_error_handler_silently_ignore : $default_error_handler;
 		@search_dirs = ($dh{SOURCEDIR} // '.', default_sourcedir($package)) if not compat(10);
 
 		@manpages = filearray($file, \@search_dirs, $error_handler) if $file;
@@ -166,7 +168,7 @@ on_items_in_parallel(\@all_packages, sub {
 
 		log_installed_files($package, @manpages);
 
-		next if not process_pkg($package) or $nodocs;
+		next if $skip_install or $nodocs;
 
 		foreach my $page (@manpages) {
 			my $basename = basename($page);

-- 
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