]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_undocumented
r495: * dh_undocumented: check for existing uncompressed man pages. Closes: #87972
[debhelper.git] / dh_undocumented
index 2242ffd6dc0f294ebeca4c7b7d519478fe9921a1..da96473e0d1e68ff8cff9b6410ca37e32c9d971a 100755 (executable)
@@ -78,7 +78,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 
                # Determine what directory the file belongs in,
                # /usr/share/man, or /usr/X11R6/man, and how the link to
-               # the undocuemtned.7 man page will look.
+               # the undocumented.7 man page will look.
                my ($dir, $reldir);
                my ($section)=$file=~m/^.*\.(\d)/;
                if (!$section) {
@@ -93,9 +93,15 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                        $reldir="";
                }
 
+               # If an uncompressed version of the page exists, something
+               # is weird.
+               if (-e "$tmp/$dir/$file") {
+                       error("A man page $tmp/$dir/$file exists.");
+               }
+               
                if (! -d "$tmp/$dir") {
                        doit("install","-d","$tmp/$dir");
-               }
+               }               
                doit("ln","-sf","${reldir}undocumented.7.gz","$tmp/$dir/$file.gz");
        }
 }