From dc2b1003057746445f5ad5a95ec9e298a221e805 Mon Sep 17 00:00:00 2001 From: joeyh Date: Sun, 21 Jan 2007 17:20:14 +0000 Subject: r1969: * dh_installdocs: In v5 mode, now ignore empty files even if they're hidden away inside a subdirectory. The code missed this before. See #200905 --- dh_installdocs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'dh_installdocs') diff --git a/dh_installdocs b/dh_installdocs index ad1c8a2c..61b65996 100755 --- a/dh_installdocs +++ b/dh_installdocs @@ -125,12 +125,15 @@ foreach my $package (@{$dh{DOPACKAGES}}) { if ($dh{EXCLUDE_FIND}) { $exclude = ' -and ! \( '.$dh{EXCLUDE_FIND}.' \)'; } + if (! compat(4)) { + # ignore empty files in subdirs + $exclude .= ' -and ! -empty'; + } foreach my $doc (@docs) { next if excludefile($doc); - next if -e $doc && ! -s $doc && ! compat(4); # ignore empty BUGS, etc - if (-d $doc && $exclude) { + next if -e $doc && ! -s $doc && ! compat(4); # ignore empty files + if (-d $doc && length $exclude) { my ($dir_basename) = basename($doc); - # Pity there's no cp --exclude .. my $pwd=`pwd`; chomp $pwd; complex_doit("cd $doc/.. && find $dir_basename \\( -type f -or -type l \\)$exclude -exec cp --parents -dp {} $pwd/$tmp/usr/share/doc/$package \\;"); -- cgit v1.2.3