dev-lang/php: call `eselect php cleanup` in pkg_postinst and pkg_postrm.
authorMichael Orlitzky <mjo@gentoo.org>
Thu, 28 Jan 2016 01:30:26 +0000 (20:30 -0500)
committerMichael Orlitzky <mjo@gentoo.org>
Thu, 28 Jan 2016 14:45:37 +0000 (09:45 -0500)
commitef0386227889557b516d86fd395417b20aa5c4a1
tree15d19cc4a104830cf65d0fb008068359b19a5219
parent7b94eef39a96b72dbf1d2249a2937a5fd075b991
dev-lang/php: call `eselect php cleanup` in pkg_postinst and pkg_postrm.

We have two bugs (432962 and 572436) regarding stale eselect symlinks.

The first issue is that removal of an old slot does not update the
eselect-php symlinks to point to a newer slot. Thus, if a user
upgrades slots and depcleans the old one, his symlinks (and thus PHP)
are left broken until eselect-php is run manually. This is fixed by
running `eselect php cleanup` in pkg_postrm, since removal of the
old slot will trigger a cleanup (which updates the symlink).

The second issue is that disabling a SAPI would leave behind a broken
symlink. For example, if the "cgi" SAPI was once used but the user has
reinstalled PHP with USE="-cgi", then the old eselect-php symlink for
php-cgi would be left behind. This is fixed by running `eselect php
cleanup` in pkg_postinst, since that will be triggered after the
reinstall finishes, at which point the php-cgi symlink will be dead
and thus get removed.

Gentoo-Bug: 432962
Gentoo-Bug: 572436

Package-Manager: portage-2.2.26
dev-lang/php/php-5.6.17-r4.ebuild [moved from dev-lang/php/php-5.6.17-r3.ebuild with 96% similarity]
dev-lang/php/php-7.0.2-r4.ebuild [moved from dev-lang/php/php-7.0.2-r3.ebuild with 96% similarity]