Stas Bekman wrote:
> Geoffrey Young wrote:
>
>> hi all
>>
>> I'm _still_ having problems with sticky preferences. unfortunately, I
>> don't
>> have the time atm to locate the specifics, but basically I was trying to
>> compile a 1.3 static build (without mod_so) using -httpd. while A-T
>> found
>> the proper httpd, LoadModule statements that pointed to my last 2.0
>> install
>> were still being generated.
>
>
> probably because of apxs and httpd mismatch?
yes. IIRC it got httpd right but APXS (note the caps) was carried over.
>
>> so, with my developer hat on I'd like to see the problem fixed. maybe
>> next
>> week I'll reproduce and track it down.
>>
>> but with my user hat on I'm starting to get really irked by all of this.
>> really, I don't want sticky preferences and never did (as a user,
>> remember
>> :). so, can we perhaps support
>> $ENV{APACHE_TEST_NO_STICKY_PREFERENCES} as a
>> way to totally disable them - no attempting to load ~/.apache-test/, no
>> generation of ~/.apache-test/, etc?
>
>
> +1, though let's keep the env var the same as the function name, so I'd
> prefer
> $ENV{APACHE_TEST_NO_CUSTOM_CONFIG} (even though yours sounds better, so
> may be we should change the function name).
>
> in any case just add:
>
> return if $ENV{APACHE_TEST_NO_STICKY_PREFERENCES}
>
> in the custom_config_load sub.
I think it's actually a bit more than that. just adding it there still
saves away ~/.apache-test/ for the run, even if it didn't exist initially.
what I wanted was a way to toally avoid it from the outset. anyway, I think
this patch does the trick, but you would know better than I would whether it
is enough.
--Geoff
Index: lib/Apache/TestRun.pm
===================================================================
RCS file:
/home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
retrieving revision 1.160
diff -u -r1.160 TestRun.pm
--- lib/Apache/TestRun.pm 11 Mar 2004 06:12:09 -0000 1.160
+++ lib/Apache/TestRun.pm 11 Mar 2004 22:47:02 -0000
@@ -1381,6 +1381,11 @@
sub custom_config_save {
my $self = shift;
+ if ($ENV{APACHE_TEST_NO_STICKY_PREFERENCES}) {
+ debug "skipping save of custom config data";
+ return;
+ }
+
my $vars = $self->{test_config}->{vars};
my $conf_opts = $self->{conf_opts};
my $config_dump = '';
@@ -1533,6 +1538,12 @@
my $custom_config_loaded = 0;
sub custom_config_load {
+
+ if ($ENV{APACHE_TEST_NO_STICKY_PREFERENCES}) {
+ debug "skipping load of custom config data";
+ return;
+ }
+
debug "trying to load custom config data";
return if $custom_config_loaded;
@@ -1808,6 +1819,10 @@
C<APACHE_TEST_GROUP>) or by giving the relevant option (C<-httpd>,
C<-apxs>, C<-port>, C<-user>, and C<-group>) when the C<TEST> script
is run.
+
+To avoid either using previous persistent configurations or saving
+current configurations, set the C<APACHE_TEST_NO_STICKY_PREFERENCES>
+environment variable.
Finally it's possible to permanently override the previously saved
options by passing C<L<-save|/Saving_Custom_Configuration_Options>>.