]> git.donarmstrong.com Git - debhelper.git/commitdiff
r1969: * dh_installdocs: In v5 mode, now ignore empty files even if they're hidden
authorjoeyh <joeyh>
Sun, 21 Jan 2007 17:20:14 +0000 (17:20 +0000)
committerjoeyh <joeyh>
Sun, 21 Jan 2007 17:20:14 +0000 (17:20 +0000)
  away inside a subdirectory. The code missed this before. See #200905

debian/changelog
dh_installdocs

index 7146b12dd1b9e50b5b7d0f56def97d8d67a1b2b2..01fdcd1fc846e38cf9f37aaedd39e0bc80b1be1c 100644 (file)
@@ -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 <joeyh@debian.org>  Sun, 21 Jan 2007 12:11:40 -0500
+ -- Joey Hess <joeyh@debian.org>  Sun, 21 Jan 2007 12:16:56 -0500
 
 debhelper (5.0.42) unstable; urgency=low
 
index ad1c8a2c5911273b8f75f06e9a6bbae1916227dc..61b65996e909ef288743e641c1ee7bbfd63fbd76 100755 (executable)
@@ -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 \\;");