From: joeyh Date: Sun, 21 Jan 2007 17:20:14 +0000 (+0000) Subject: r1969: * dh_installdocs: In v5 mode, now ignore empty files even if they're hidden X-Git-Tag: 5.0.43~7 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=dc2b1003057746445f5ad5a95ec9e298a221e805;p=debhelper.git 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 --- diff --git a/debian/changelog b/debian/changelog index 7146b12..01fdcd1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,8 +14,10 @@ debhelper (5.0.43) UNRELEASED; urgency=low * dh_fixperms: Make all files in /usr/include 644, not only .h files. Closes: #404785 * Man page improvements. Closes: #406707 + * 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 - -- Joey Hess Sun, 21 Jan 2007 12:11:40 -0500 + -- Joey Hess Sun, 21 Jan 2007 12:16:56 -0500 debhelper (5.0.42) unstable; urgency=low diff --git a/dh_installdocs b/dh_installdocs index ad1c8a2..61b6599 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 \\;");