On Sat, May 27, 2017 at 12:51:38AM +0200, Michael Biebl wrote:
> Package: debhelper
> Version: 10.4
> Severity: normal
> 
> Hi,
> 
> I just tried debhelper 10.4 from experimental which implements
> dh_install --list/fail-missing via the new dh_missing tool.
> 
> I don't use dh_missing directly yet, but rely on the backwards compat
> support. My debian/rules contains
> 
> override_dh_install:
>       dh_install -X.la --list-missing
> 
> Apparently the -X.la is ignored though and dh_missing still complains
> about the libtool .la files:

Indeed. How about a patch like this? Comes with a test.

Cheers,

-- 
Iain Lane                                  [ i...@orangesquash.org.uk ]
Debian Developer                                   [ la...@debian.org ]
Ubuntu Developer                                   [ la...@ubuntu.com ]
From 0ca87c2d2b383e1e6e0c42c4f74e48eeb60cbb35 Mon Sep 17 00:00:00 2001
From: Iain Lane <la...@debian.org>
Date: Wed, 31 May 2017 20:45:15 +0100
Subject: [PATCH] dh_install: Pass --exclude/-X to dh_missing. (Closes:
 #863447)

---
 debian/changelog          | 6 ++++++
 dh_install                | 3 +++
 t/dh_missing/Makefile     | 1 +
 t/dh_missing/dh_missing.t | 9 ++++++++-
 4 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index db49925f..20628ddd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+debhelper (10.5) UNRELEASED; urgency=medium
+
+  * dh_install: Pass --exclude/-X to dh_missing. (Closes: #863447)
+
+ -- Iain Lane <la...@debian.org>  Wed, 31 May 2017 20:40:24 +0100
+
 debhelper (10.4) experimental; urgency=medium
 
   * Team upload.
diff --git a/dh_install b/dh_install
index 820ac70b..2806af9e 100755
--- a/dh_install
+++ b/dh_install
@@ -271,6 +271,9 @@ if ($missing_files) {
 
 if ($dh{LIST_MISSING} || $dh{FAIL_MISSING}) {
 	my @options;
+	foreach (@{$dh{EXCLUDE}}) {
+		push(@options, '--exclude', $_);
+	}
 	push(@options, '--sourcedir', $dh{SOURCEDIR}) if defined($dh{SOURCEDIR});
 	push @options, "--list-missing" if $dh{LIST_MISSING};
 	push @options, "--fail-missing" if $dh{FAIL_MISSING};
diff --git a/t/dh_missing/Makefile b/t/dh_missing/Makefile
index 679592a7..e33e1dfc 100644
--- a/t/dh_missing/Makefile
+++ b/t/dh_missing/Makefile
@@ -4,3 +4,4 @@ install:
 
 installmore: install
 	install -m 644 file-for-foo debian/tmp/usr/bin/file-for-foo-more
+	install -m 644 file-for-foo debian/tmp/usr/bin/file-for-foo-lots
diff --git a/t/dh_missing/dh_missing.t b/t/dh_missing/dh_missing.t
index 6cd80ea8..851c5ef5 100755
--- a/t/dh_missing/dh_missing.t
+++ b/t/dh_missing/dh_missing.t
@@ -22,7 +22,7 @@ if (not defined($rootcmd)) {
 	plan skip_all => 'fakeroot required';
 }
 else {
-	plan(tests => 4);
+	plan(tests => 5);
 }
 
 # Verify dh_missing does not fail when all files are installed.
@@ -41,6 +41,13 @@ ok(! ($? & 127), 'dh_missing did not die due to a signal');
 my $exitcode = ($? >> 8);
 is($exitcode, 2, 'dh_missing exited with exit code 2');
 
+# Verify that dh_install -X --fail-missing is passed through to dh_missing (#863447)
+# dh_install -Xfile makes file-for-foo not be installed. Then we shouldn't
+# complain about it not being missing.
+system("$rootcmd $TOPDIR/dh_clean");
+system("$rootcmd make install");
+is(system("PATH=$TOPDIR:\$PATH $rootcmd $TOPDIR/dh_install -X more --exclude lots --fail-missing"),0, 'dh_install -X... --fail-missing failed');
+
 system("$rootcmd $TOPDIR/dh_clean");
 
 # Local Variables:
-- 
2.11.0

Attachment: signature.asc
Description: PGP signature

Reply via email to