Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 87869 invoked from network); 11 Jan 2004 22:00:28 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 11 Jan 2004 22:00:28 -0000 Received: (qmail 11872 invoked by uid 500); 11 Jan 2004 22:00:04 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 11793 invoked by uid 500); 11 Jan 2004 22:00:04 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 11773 invoked from network); 11 Jan 2004 22:00:04 -0000 Message-ID: <4001CA96.5050702@stason.org> Date: Sun, 11 Jan 2004 14:13:42 -0800 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031010 X-Accept-Language: en-us, en, he, ru MIME-Version: 1.0 Cc: steve larson , mod_perl Mailing List Subject: Re: Modperl 2.0 Not finding correct *.conf References: <20040110205654.85724.qmail@web40706.mail.yahoo.com> <4001B820.20300@stason.org> In-Reply-To: <4001B820.20300@stason.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Stas Bekman wrote: > steve larson wrote: > >> Hello, >> make test produced error, looking for >> /etc/httpd/*.conf > > > it's a warning, not an error. It'd have died if it was an error. I can > see where the problem is, I'll fix that soonish. It's unrelated to the > problem preventing you from running the test suite. Please try this patch: Index: lib/Apache/TestConfigParse.pm =================================================================== RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigParse.pm,v retrieving revision 1.41 diff -u -r1.41 TestConfigParse.pm --- lib/Apache/TestConfigParse.pm 9 Dec 2003 14:53:58 -0000 1.41 +++ lib/Apache/TestConfigParse.pm 11 Jan 2004 21:59:59 -0000 @@ -9,7 +9,7 @@ use Apache::TestTrace; use File::Spec::Functions qw(rel2abs splitdir file_name_is_absolute); -use File::Basename qw(basename); +use File::Basename qw(dirname basename); sub strip_quotes { local $_ = shift || $_; @@ -43,7 +43,8 @@ $self->$where($directive => $val); } -#resolve relative files like Apache->server_root_relative +# resolve relative files like Apache->server_root_relative +# this function doesn't test whether the resolved file exists sub server_file_rel2abs { my($self, $file, $base) = @_; @@ -87,14 +88,20 @@ # return early, skipping file test below return $file; } - } - if (-e $result) { - debug "$file successfully resolved to existing file $result"; + my $dir = dirname $result; + # $file might not exist (e.g. if it's a glob pattern like + # "conf/*.conf" but what we care about here is to check whether + # the base dir was successfully resolved. we don't check whether + # the file exists at all. it's the responsibility of the caller to + # do this check + if (defined $dir && -e $dir && -d _) { + debug "$file successfully resolved to $result"; } else { - warning "file $result does not exist"; + $dir ||= ''; + warning "dir '$dir' does not exist (while resolving '$file')"; # old behavior was to return the resolved but non-existent # file. preserve that behavior and return $result anyway. __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html