commit: 2f1ec08068f8c91a0fd9b70a1426cd78bbcad6ac
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 8 19:23:41 2016 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Jan 8 19:23:41 2016 +0000
URL: https://gitweb.gentoo.org/proj/eselect-php.git/commit/?id=2f1ec080
Add config warning when setting the apache2 target.
src/php.eselect.in | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/src/php.eselect.in b/src/php.eselect.in
index 7acda64..b47d218 100644
--- a/src/php.eselect.in
+++ b/src/php.eselect.in
@@ -463,7 +463,27 @@ set_sapi() {
}
+# Check to see if the user is still using the old-style apache
+# configuration with -DPHP5 and 70_mod_php5.conf. If he is, warn him
+# that it is outdated, and that his eselect choices will not have any
+# effect until the configuration is updated.
+apache2_php5_config_check() {
+ if [ -f "${EROOT}/etc/apache2/modules.d/70_mod_php5.conf" ] ; then
+ local msg
+ write_warning_msg "The apache2 configuration has changed in
this"
+ write_warning_msg "version of eselect-php. You should define
\"-D PHP\""
+ write_warning_msg "and not \"-D PHP5\" for apache. The module
is now"
+ write_warning_msg "loaded by 70_mod_php.conf (was
70_mod_php5.conf)."
+ write_warning_msg "After you have changed \"-D PHP5\" to \"-D
PHP\", "
+ write_warning_msg "you should remove 70_mod_php5.conf to
eliminate"
+ write_warning_msg "this warning. Until you have done so, your
eselect"
+ write_warning_msg "choices for apache2 will have no effect."
+ echo
+ fi
+}
+
set_apache2() {
+ apache2_php5_config_check
local target="${1}"
set_sapi apache2 "${target}"
write_mod_php_conf "$(resolv_target apache2 "${target}")"