You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@apache.org on 2002/12/09 16:00:59 UTC
cvs commit: httpd-2.0/support apxs.in
stoddard 2002/12/09 07:00:59
Modified: . CHANGES
support apxs.in
Log:
If an httpd.conf has commented out AddModule directives,
apxs -i -a will add an un-commented AddModule directive for
the new module, which breaks the config.
PR: 11212
Submitted by: Joe Orton
Reviewed by: Bill Stoddard, Thom May
Revision Changes Path
1.1006 +4 -0 httpd-2.0/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/httpd-2.0/CHANGES,v
retrieving revision 1.1005
retrieving revision 1.1006
diff -u -r1.1005 -r1.1006
--- CHANGES 9 Dec 2002 05:37:26 -0000 1.1005
+++ CHANGES 9 Dec 2002 15:00:58 -0000 1.1006
@@ -1,4 +1,8 @@
Changes with Apache 2.1.0-dev
+ *) If an httpd.conf has commented out AddModule directives,
+ apxs -i -a will add an un-commented AddModule directive for
+ the new module, which breaks the config.
+ PR: 11212 [Joe Orton]
[Remove entries to the current 2.0 section below, when backported]
1.48 +2 -12 httpd-2.0/support/apxs.in
Index: apxs.in
===================================================================
RCS file: /home/cvs/httpd-2.0/support/apxs.in,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- apxs.in 19 Sep 2002 05:43:16 -0000 1.47
+++ apxs.in 9 Dec 2002 15:00:59 -0000 1.48
@@ -490,9 +490,8 @@
##
# determine installation commands
- # and corresponding LoadModule/AddModule directives
+ # and corresponding LoadModule directive
my @lmd = ();
- my @amd = ();
my @cmds = ();
my $f;
foreach $f (@args) {
@@ -546,7 +545,6 @@
$dir =~ s|(.)$|$1/|;
$t =~ s|\.la$|.so|;
push(@lmd, sprintf("LoadModule %-18s %s", "${name}_module", "$dir$t"));
- push(@amd, sprintf("AddModule %s", $filename));
}
# execute the commands
@@ -582,15 +580,7 @@
$lmd =~ m|LoadModule\s+(.+?)_module.*|;
notice("[$what module `$1' in $CFG_SYSCONFDIR/$CFG_TARGET.conf]");
}
- my $amd;
- foreach $amd (@amd) {
- if ($content !~ m|\n#?\s*$amd|) {
- $content =~ s|^(.*\n#?\s*AddModule\s+[^\n]+\n)|$1$c$amd\n|sg;
- } else {
- $content =~ s|^(.*\n)#?\s*$amd[^\n]*\n|$1$c$amd\n|sg;
- }
- }
- if (@lmd or @amd) {
+ if (@lmd) {
if (open(FP, ">$CFG_SYSCONFDIR/$CFG_TARGET.conf.new")) {
print FP $content;
close(FP);