From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D1DF51384B4 for ; Fri, 11 Dec 2015 00:40:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EF8A321C007; Fri, 11 Dec 2015 00:40:33 +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 5C29221C007 for ; Fri, 11 Dec 2015 00:40:33 +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 3C13734096F for ; Fri, 11 Dec 2015 00:40:32 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 03683E54 for ; Fri, 11 Dec 2015 00:40:30 +0000 (UTC) From: "Michael Orlitzky" 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" Message-ID: <1449781229.41eea178ac8b07da9795ef3ec4c77595037fdb2c.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: 41eea178ac8b07da9795ef3ec4c77595037fdb2c X-VCS-Branch: master Date: Fri, 11 Dec 2015 00:40:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 28edffb9-727d-4f6d-b2a2-b6659ecac3b8 X-Archives-Hash: 081e380ed58a81baac64caac4a239d0c commit: 41eea178ac8b07da9795ef3ec4c77595037fdb2c Author: Michael Orlitzky gentoo org> AuthorDate: Thu Dec 10 21:00:29 2015 +0000 Commit: Michael Orlitzky gentoo org> CommitDate: Thu Dec 10 21:00:29 2015 +0000 URL: https://gitweb.gentoo.org/proj/eselect-php.git/commit/?id=41eea178 Add the get_apache2_active_symlink_path() function. The "active symlink" is used in two places: to determine the active version, and to set it. Factor its magic out into a separate function. src/php.eselect.in | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/php.eselect.in b/src/php.eselect.in index 2ea8c3d..d882095 100644 --- a/src/php.eselect.in +++ b/src/php.eselect.in @@ -158,6 +158,24 @@ get_active_fpm() { [[ -a "${target}" ]] && echo "${target}" | @SED@ -ne "${ver}" } +# The path to the active version of the apache2 module, which should +# be a symlink. This is the path used by our apache configuration to +# load the PHP module. The path is unversioned (that is, it has no "5" +# or "7" in it) so that the apache configuration does not need to +# change after the user eselects a different version. +# +# INPUT: +# +# None. +# +# OUTPUT: +# +# The path to our libphp.so symlink, which should (but is not +# guaranteed to) point to a real apache DSO. +# +get_apache2_active_symlink_path() { + echo "${EROOT}$(get_active_libdir)/apache2/modules/libphp.so" +} # Find the active (selected) version of the apache2 module. Used to # decorate the output of the `eselect php list apache2` command.