public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michael Orlitzky" <mjo@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/eselect-php:master commit in: src/
Date: Fri, 22 Jan 2016 19:14:44 +0000 (UTC)	[thread overview]
Message-ID: <1453484863.2b82d0c0c967f59f5993bea53bb5dd86693beef0.mjo@gentoo> (raw)

commit:     2b82d0c0c967f59f5993bea53bb5dd86693beef0
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 22 17:47:43 2016 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Jan 22 17:47:43 2016 +0000
URL:        https://gitweb.gentoo.org/proj/eselect-php.git/commit/?id=2b82d0c0

Remove cleanup_sapis() and ensmarten the libphp[57].so symlink removal.

The cleanup_sapis() function was only called in one place, so it was a
pointless layer of indirection. Move it into do_cleanup(). Also, make
sure we don't remove libphp[57].so symlinks unless they're actually
symlinks and in fact dead.

 src/php.eselect.in.in | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/php.eselect.in.in b/src/php.eselect.in.in
index ff3914f..7e52f53 100644
--- a/src/php.eselect.in.in
+++ b/src/php.eselect.in.in
@@ -173,14 +173,6 @@ parse_target_major_version() {
 	esac
 }
 
-cleanup_sapis() {
-	local m
-	local link
-	for m in $MODULES ; do
-		cleanup_sapi $m
-	done
-}
-
 cleanup_sapi() {
 	local sapi="${1}"
 	local l="${sapi}_link"
@@ -197,11 +189,6 @@ cleanup_sapi() {
 		fi
 	fi
 
-	if [[ "${sapi}" == "apache2" ]] ; then
-		rm -f "@LIBDIR@"/apache2/modules/libphp[57].so \
-		   || die "failed to remove old libphp.so symlink"
-	fi
-
 	return 1
 }
 
@@ -582,5 +569,18 @@ describe_cleanup_options() {
 }
 
 do_cleanup() {
-	cleanup_sapis
+	for sapi in $MODULES ; do
+		cleanup_sapi "${sapi}"
+	done
+
+	# Remove older (and dead) apache2 symlinks. These days the symlink
+	# is called mod_php.so. This cleanup code can be removed after a
+	# while, after we think most people will have switched to the new
+	# symlink and removed the old one.
+	for link in "@LIBDIR@"/apache2/modules/libphp[57].so; do
+		if [[ -L "${link}" && ! -e "${link}" ]] ; then
+			rm -f "${link}" || die "failed to remove old libphp.so symlink"
+			echo "Removed broken symlink ${link}."
+		fi
+	done
 }


             reply	other threads:[~2016-01-22 19:14 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22 19:14 Michael Orlitzky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-12-08  2:24 [gentoo-commits] proj/eselect-php:master commit in: src/ Brian Evans
2020-03-01 12:59 Michael Orlitzky
2020-02-29 22:16 Michael Orlitzky
2020-02-29 22:16 Michael Orlitzky
2020-02-29 22:16 Michael Orlitzky
2020-02-29 22:16 Michael Orlitzky
2020-02-12 22:30 Michael Orlitzky
2018-04-12  2:24 Michael Orlitzky
2016-01-22 20:53 Michael Orlitzky
2016-01-22 19:42 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22  3:15 Michael Orlitzky
2016-01-22  3:15 Michael Orlitzky
2016-01-22  3:15 Michael Orlitzky
2016-01-22  3:15 Michael Orlitzky
2016-01-20 14:42 Michael Orlitzky
2016-01-09 17:20 Michael Orlitzky
2016-01-09 17:20 Michael Orlitzky
2016-01-09  2:24 Michael Orlitzky
2016-01-09  2:24 Michael Orlitzky
2016-01-09  2:24 Michael Orlitzky
2016-01-09  2:24 Michael Orlitzky
2016-01-09  2:24 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2015-12-20  0:17 Michael Orlitzky
2015-12-20  0:17 Michael Orlitzky
2015-12-20  0:17 Michael Orlitzky
2015-12-20  0:17 Michael Orlitzky
2015-12-20  0:17 Michael Orlitzky
2015-12-20  0:17 Michael Orlitzky
2015-12-20  0:17 Michael Orlitzky
2015-12-20  0:17 Michael Orlitzky
2015-12-20  0:17 Michael Orlitzky
2015-12-18  2:27 Brian Evans
2015-12-11  0:40 Michael Orlitzky
2015-12-11  0:40 Michael Orlitzky
2015-12-11  0:40 Michael Orlitzky
2015-12-11  0:40 Michael Orlitzky
2015-12-11  0:40 Michael Orlitzky
2015-12-11  0:40 Michael Orlitzky
2015-12-11  0:40 Michael Orlitzky
2015-12-11  0:40 Michael Orlitzky
2015-12-11  0:40 Michael Orlitzky
2015-12-11  0:40 Michael Orlitzky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453484863.2b82d0c0c967f59f5993bea53bb5dd86693beef0.mjo@gentoo \
    --to=mjo@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox