]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_installchangelogs
r378: * dh_movefiles: fixed a regexp quoting problem with --sourcedir.
[debhelper.git] / dh_installchangelogs
index e653019132f04529af017c77eae306953e431275..e14eba68b3f700e8e706c95a726c3a1a590c326f 100755 (executable)
@@ -36,22 +36,27 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        }
 
        if (! -d "$TMP/usr/share/doc/$PACKAGE") {
+               # If it is a dangling symlink, then don't do anything.
+               # Think multi-binary packages that depend on each other and
+               # want to link doc dirs.
+               next if -l "$TMP/usr/share/doc/$PACKAGE";
+
                doit("install","-d","$TMP/usr/share/doc/$PACKAGE");
        }
-       doit("install","-o","root","-g","root","-p","-m644",$changelog,
+       doit("install","-o",0,"-g",0,"-p","-m644",$changelog,
                "$TMP/usr/share/doc/$PACKAGE/$changelog_name");
 
        if ($upstream) {
                my $link_to;
                if ($upstream=~m/\.html?$/i) {
                        # HTML changelog
-                       doit("install","-o","root","-g","root","-p","-m644",
+                       doit("install","-o",0,"-g",0,"-p","-m644",
                                $upstream,"$TMP/usr/share/doc/$PACKAGE/changelog.html");
                        complex_doit("lynx -dump $upstream > $TMP/usr/share/doc/$PACKAGE/changelog");
                        $link_to='changelog.html';
                }
                else {
-                       doit("install","-o","root","-g","root","-p","-m644",
+                       doit("install","-o",0,"-g",0,"-p","-m644",
                                $upstream,"$TMP/usr/share/doc/$PACKAGE/changelog");
                        $link_to='changelog';                           
                }