Debian and Ubuntu packaged versions of Apache2 don't define PREFIX,
so 'make test' output is filled with warnings like
 APXS (/usr/bin/apxs2) query for PREFIX failed

The attached proposed patch to Apache-Test fixes this, hopefully in a
non-intrusive way. Hope this is the right place to send this?  It's not
quite clear to me how the CPAN RT ticket queues relate to this list.
-- 
Niko Tyni   nt...@debian.org
>From 4186693bc0224d92f522e90ca61a7b8aafc0944f Mon Sep 17 00:00:00 2001
From: Niko Tyni <nt...@debian.org>
Date: Wed, 5 Jun 2013 13:57:00 +0300
Subject: [PATCH] Apache-Test: Fall back to SYSCONFDIR if PREFIX is not set

Debian and Ubuntu packaged versions of Apache2 don't define PREFIX,
so 'make test' output is filled with warnings like
 APXS (/usr/bin/apxs2) query for PREFIX failed

Falling back to SYSCONFDIR (which is /etc/apache2 on Debian)
should be better than failing altogether.
---
 Apache-Test/lib/Apache/TestConfigParse.pm |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Apache-Test/lib/Apache/TestConfigParse.pm b/Apache-Test/lib/Apache/TestConfigParse.pm
index 2534ce1..789eb91 100644
--- a/Apache-Test/lib/Apache/TestConfigParse.pm
+++ b/Apache-Test/lib/Apache/TestConfigParse.pm
@@ -87,8 +87,10 @@ sub server_file_rel2abs {
                        'user-supplied $base' ],
                  [ $self->{inherit_config}->{ServerRoot},
                        'httpd.conf inherited ServerRoot' ],
-                 [ $self->apxs('PREFIX'),
-                       'apxs-derived ServerRoot' ]);
+                 [ $self->apxs('PREFIX', 1), # ok_fail => 1
+                       'apxs-derived ServerRoot based on PREFIX' ],
+                 [ $self->apxs('SYSCONFDIR'),
+                       'apxs-derived ServerRoot based on SYSCONFDIR' ]);
 
     # remove surrounding quotes if any
     # e.g. Include "/tmp/foo.html"
-- 
1.7.10.4


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@perl.apache.org
For additional commands, e-mail: dev-h...@perl.apache.org

Reply via email to