commit:     b615cdde19ca363777e4257718a3e19f16fd0b3d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 10 19:38:37 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Aug 26 13:36:53 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b615cdde

dev-util/ccache: Use dev-util/shadowman for postinst/prerm

 dev-util/ccache/ccache-3.3.4-r1.ebuild | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/dev-util/ccache/ccache-3.3.4-r1.ebuild 
b/dev-util/ccache/ccache-3.3.4-r1.ebuild
index 2fd005d8804..56fe73b6cea 100644
--- a/dev-util/ccache/ccache-3.3.4-r1.ebuild
+++ b/dev-util/ccache/ccache-3.3.4-r1.ebuild
@@ -11,12 +11,13 @@ SRC_URI="https://samba.org/ftp/ccache/${P}.tar.xz";
 
 LICENSE="GPL-3"
 SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos 
~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 ~x86"
 IUSE=""
 
 DEPEND="app-arch/xz-utils
        sys-libs/zlib"
 RDEPEND="${DEPEND}
+       dev-util/shadowman
        sys-apps/gentoo-functions"
 
 src_prepare() {
@@ -52,18 +53,17 @@ ccache now supports sys-devel/clang and dev-lang/icc, too!"
 }
 
 pkg_prerm() {
-       if [[ -z ${REPLACED_BY_VERSION} ]] ; then
-               "${EROOT}"/usr/bin/ccache-config --remove-links
-               "${EROOT}"/usr/bin/ccache-config --remove-links ${CHOST}
+       if [[ -z ${REPLACED_BY_VERSION} && ${ROOT} == / ]] ; then
+               eselect compiler-shadow remove ccache
        fi
 }
 
 pkg_postinst() {
-       "${EROOT}"/usr/bin/ccache-config --install-links
-       "${EROOT}"/usr/bin/ccache-config --install-links ${CHOST}
+       if [[ ${ROOT} == / ]]; then
+               eselect compiler-shadow update ccache
+       fi
 
        # nuke broken symlinks from previous versions that shouldn't exist
-       rm -f "${EROOT}"/usr/lib/ccache/bin/${CHOST}-cc || die
        rm -rf "${EROOT}"/usr/lib/ccache.backup || die
 
        readme.gentoo_print_elog

Reply via email to