From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-856000-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 1767E1388BF
	for <garchives@archives.gentoo.org>; Fri,  8 Jan 2016 21:50:34 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 1425F21C00C;
	Fri,  8 Jan 2016 21:50:28 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id E4BA921C00B
	for <gentoo-commits@lists.gentoo.org>; Fri,  8 Jan 2016 21:50:26 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 314133409D7
	for <gentoo-commits@lists.gentoo.org>; Fri,  8 Jan 2016 21:50:26 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id BB000D23
	for <gentoo-commits@lists.gentoo.org>; Fri,  8 Jan 2016 21:50:23 +0000 (UTC)
From: "Michael Orlitzky" <mjo@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michael Orlitzky" <mjo@gentoo.org>
Message-ID: <1452281021.2f1ec08068f8c91a0fd9b70a1426cd78bbcad6ac.mjo@gentoo>
Subject: [gentoo-commits] proj/eselect-php:master commit in: src/
X-VCS-Repository: proj/eselect-php
X-VCS-Files: src/php.eselect.in
X-VCS-Directories: src/
X-VCS-Committer: mjo
X-VCS-Committer-Name: Michael Orlitzky
X-VCS-Revision: 2f1ec08068f8c91a0fd9b70a1426cd78bbcad6ac
X-VCS-Branch: master
Date: Fri,  8 Jan 2016 21:50:23 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 85cdcf02-bc4d-4cbd-b65f-f4615258fb83
X-Archives-Hash: e93c1e0b87718ce72882e9a65ef4acbc

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}")"