diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-01-11 13:48:10 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-01-11 13:48:10 -0500 |
commit | fcc792210d4e089a41b1c14ccca9f0a8a7e0f2ec (patch) | |
tree | 258f14c00bd903dcc5345e73240d3fa32ac32803 /dh_installexamples | |
parent | 7a31338038368a1ff845711c53d4b95395daa942 (diff) | |
download | debhelper-fcc792210d4e089a41b1c14ccca9f0a8a7e0f2ec.tar.gz |
* dh_installdocs/examples: Don't unnecessarily use the exclude code path.
* Avoid infiinite recursion when told to install a directory ending with
"/." (slashdot effect?). Indeed, arbitrarily complex paths can be used
now, although there's really no point in using them. Closes: #253234
Diffstat (limited to 'dh_installexamples')
-rwxr-xr-x | dh_installexamples | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dh_installexamples b/dh_installexamples index 4e0bace0..25661dfe 100755 --- a/dh_installexamples +++ b/dh_installexamples @@ -8,6 +8,7 @@ dh_installexamples - install example files into package build directories use strict; use Debian::Debhelper::Dh_Lib; +use Cwd q{abs_path}; =head1 SYNOPSIS @@ -78,7 +79,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { doit("install","-d","$tmp/usr/share/doc/$package/examples"); } - my $exclude = '-type f'; + my $exclude = ''; if ($dh{EXCLUDE_FIND}) { $exclude .= ' -and ! \( '.$dh{EXCLUDE_FIND}.' \)'; } @@ -86,9 +87,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) { foreach my $example (@examples) { next if excludefile($example); if (-d $example && $exclude) { - my ($dir_basename) = basename($example); + my ($dir_basename) = basename(abs_path($example)); my $pwd=`pwd`; chomp $pwd; + $exclude = '-type f'.$exclude; complex_doit("cd '$example/..' && find '$dir_basename' $exclude -exec cp --parents -dp {} $pwd/$tmp/usr/share/doc/$package/examples \\;"); } else { |