Date: Mon, 5 Jan 1998 18:37:32 +0100 (CET) From: Martin Kammerhofer <dada@sbox.tu-graz.ac.at> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/5439: catman -r deletes perl manpages Message-ID: <199801051737.SAA07190@localhost.tu-graz.ac.at> Resent-Message-ID: <199801082231.OAA09364@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 5439
>Category: bin
>Synopsis: catman -r deletes perl manpages
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Jan 8 14:31:03 PST 1998
>Last-Modified:
>Originator: Martin Kammerhofer
>Organization:
Graz University of Technology
>Release: FreeBSD 2.2.5-STABLE i386
>Environment:
nothing special
>Description:
The manpage states that option -r of catman:
-r, -remove
Remove garbage, e. g. catpage without manpage, uncompressed cat-
page but a compressed catpage exist, filenames with non-alphanu-
meric characters, uncompressed manpage but a compressed manpage
exist.
Actually catman accepts [.+-[] in filenames but no colons.
As a consequence catman - a perl script - will happily delete lots of
manpages in /usr/local/lib/perl5/man/man3 because their filenames
contain the string ``::''.
>How-To-Repeat:
catman -r /usr/local/lib/perl5/man/man3
>Fix:
Index: catman.perl
===================================================================
RCS file: /home/dada/cvsroot/scripts/catman.perl,v
retrieving revision 2.1
retrieving revision 2.4
diff -u -r2.1 -r2.4
--- catman.perl 1998/01/05 13:37:34 2.1
+++ catman.perl 1998/01/05 15:55:10 2.4
@@ -228,7 +228,7 @@
next if $file eq "." || $file eq "..";
# fo_09-o.bar0
- if ($file !~ /^[\w\-\+\[\.]+\.\w+$/) {
+ if ($file !~ /^[\w-+[.:]+\.\w+$/) {
&garbage("$mandir/$file", "Assume garbage")
unless -d "$mandir/$file";
next;
@@ -285,7 +285,7 @@
foreach $file (readdir(D)) {
next if $file =~ /^(\.|\.\.)$/; # skip current and parent directory
- if ($file !~ /^[\w\-\+\[\.]+\.\w+$/) {
+ if ($file !~ /^[\w-+[.:]+\.\w+$/) {
&garbage("$catdir/$file", "Assume garbage")
unless -d "$catdir/$file";
next;
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801051737.SAA07190>
