[debhelper-devel] [debhelper] 01/03: dh_install: Pass --exclude/-X to dh_missing. (Closes: #863447)

Niels Thykier nthykier at moszumanska.debian.org
Sun Jun 4 14:13:32 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 d9a2d17f7cf550b8eed76649a9afcb5bf04ab45c
Author: Iain Lane <laney at debian.org>
Date:   Wed May 31 20:45:15 2017 +0100

    dh_install: Pass --exclude/-X to dh_missing. (Closes: #863447)
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 debian/changelog          | 1 +
 dh_install                | 3 +++
 t/dh_missing/Makefile     | 1 +
 t/dh_missing/dh_missing.t | 9 ++++++++-
 4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index f6d5543..22ad963 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,7 @@ debhelper (10.5) UNRELEASED; urgency=medium
   [ Iain Lane ]
   * Dh_Lib: Re-add warning + exit 0 for the -i/-a shortcut that was
     added in 10.3.  (Closes: #863961)
+  * dh_install: Pass --exclude/-X to dh_missing. (Closes: #863447)
 
   [ Michael Stapelberg ]
   * Dh_Getopt: Provide a more detailed error message when there are
diff --git a/dh_install b/dh_install
index 820ac70..2806af9 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 679592a..e33e1df 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 6cd80ea..851c5ef 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:

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