]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_installdocs
r409: * Corrected globbing issue with dh_movefiles in v3 mode. Closes: #81431
[debhelper.git] / dh_installdocs
index 5a3ef709b1f17a1e593ef20b7871843cf879a5ff..6191091ac62a1ddcb5438c00338832203a200c41 100755 (executable)
@@ -21,7 +21,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        undef @docs;
 
        if ($file) {
-               @docs=filearray($file);
+               @docs=filearray($file, ".");
        }
 
        if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
@@ -57,16 +57,21 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                }
        }
 
-       # Support debian/package.copyright, but if not present, fall back
-       # on debian/copyright for all packages, not just the main binary
-       # package.
-       $copyright=pkgfile($PACKAGE,'copyright');
-       if (! $copyright && -e "debian/copyright") {
-               $copyright="debian/copyright";
-       }
-       if ($copyright) {
-                       doit("install","-g",0,"-o",0,"-m","644","-p",$copyright,
-                               "$TMP/usr/share/doc/$PACKAGE/copyright");
+       # If the "directory" is a dangling symlink, then don't install
+       # the copyright file. This is useful for multibinary packages 
+       # that share a doc directory.
+       if (-d "$TMP/usr/share/doc/$PACKAGE") {
+               # Support debian/package.copyright, but if not present, fall
+               # back on debian/copyright for all packages, not just the 
+               # main binary package.
+               $copyright=pkgfile($PACKAGE,'copyright');
+               if (! $copyright && -e "debian/copyright") {
+                       $copyright="debian/copyright";
+               }
+               if ($copyright) {
+                               doit("install","-g",0,"-o",0,"-m","644","-p",$copyright,
+                                       "$TMP/usr/share/doc/$PACKAGE/copyright");
+               }
        }
 
        # Add in the /usr/doc compatability symlinks code.