[debhelper-devel] [debhelper] 05/15: dh_installexamples: Use new glob_expand-enabled filearray

Niels Thykier nthykier at moszumanska.debian.org
Wed Jun 28 13:47:47 UTC 2017


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

nthykier pushed a commit to branch glob-refactor
in repository debhelper.

commit 71e3350dde03dcb632d82dcc42203729c7458d28
Author: Niels Thykier <niels at thykier.net>
Date:   Tue Jun 27 15:56:10 2017 +0000

    dh_installexamples: Use new glob_expand-enabled filearray
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 dh_installexamples | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dh_installexamples b/dh_installexamples
index 5a695dd..53ddc74 100755
--- a/dh_installexamples
+++ b/dh_installexamples
@@ -64,6 +64,8 @@ init();
 # PROMISE: DH NOOP WITHOUT examples
 
 my $pwd;
+my @search_dirs = ('.');
+my $error_handler = compat(10) ? \&glob_expand_error_handler_warn_and_discard : \&glob_expand_error_handler_reject;
 
 foreach my $package (@{$dh{DOPACKAGES}}) {
 	next if is_udeb($package);
@@ -74,7 +76,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 	my @examples;
 	
 	if ($file) {
-		@examples=filearray($file, ".");
+		@examples = filearray($file, \@search_dirs, $error_handler) if $file;
 	}	
 
 	if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {

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