Bug#280549: listconffiles should ignore files like apache does
Package: apache
Version: 1.3.31-7
Severity: normal
Tags: patch
Hi Fabbione,
we talked about this in September.
| Setting up apache (1.3.31-7) ...
| Use of uninitialized value in pattern match (m//) at
| /usr/share/apache/listconffiles line 92, <> line 495 (#1)
| (W uninitialized) An undefined value was used as if it were already
| defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
| To suppress this warning assign a defined value to your variables.
|
| To help you figure out what was undefined, perl tells you what operation
| you used the undefined value in. Note, however, that perl optimizes your
| program and the operation displayed in the warning may not necessarily
| appear literally in your program. For example, "that $foo" is
| usually optimized into "that " . $foo, and the warning will refer to
| the concatenation (.) operator, even though there is no . in your
| program.
|
| Use of uninitialized value in pattern match (m//) at
| /usr/share/apache/listconffiles line 97, <> line 495 (#1)
| Use of uninitialized value in pattern match (m//) at
| /usr/share/apache/listconffiles line 108, <> line 495 (#1)
In etc/apache/conf.d I have RCS files, and apache (with the debian)
patch ignores those filers properly (they have a , in their name).
Unfortunately listconffiles doesn't have the same behaviour.
That is the patch I sent you in September:
--- /usr/share/apache/listconffiles 2004-06-11 00:10:07.000000000 +0200
+++ listconffiles 2004-09-20 14:11:06.000000000 +0200
@@ -27,12 +27,20 @@
# must be the base config file.
#
+sub usage() {
+ print STDERR "Usage: $0 [-V] <baseconfigfile>\n";
+ exit 1;
+}
+
+usage() unless scalar @ARGV > 0;
+
if ( $ARGV[0] eq "-V" ) {
$withvhosts = 1;
- $baseconfig=$ARGV[1];
-} else {
- $baseconfig=$ARGV[0];
-}
+ shift @ARGV;
+};
+usage() unless scalar @ARGV == 1;
+$baseconfig = shift @ARGV;
+
scanfile($baseconfig);
@@ -130,7 +138,8 @@
# $dir =~ s/\"//g;
# print "DEBUG: working on $dir with regexp $glob\n";
opendir (DIR, $dir) or warn "Can't open directory $dir\n$!\n";
- my @files = grep (!/^\.{1,2}$/ && /^$glob$/, readdir(DIR));
+ # ignore ., .., and RCS style ,v files. And glob
+ my @files = grep (!/^\.{1,2}$/ && !/,v$/ && /^$glob$/, readdir(DIR));
# print "DEBUG: found @files\n";
closedir DIR;
foreach (@files) {
--
Peter
Reply to: