From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1854B1396D0 for ; Sun, 20 Aug 2017 10:28:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E6D701FC0B3; Sun, 20 Aug 2017 10:27:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9ECFF1FC046 for ; Sun, 20 Aug 2017 10:27:31 +0000 (UTC) Received: from localhost.localdomain (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id BEDCE3419B5; Sun, 20 Aug 2017 10:27:22 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: cluster@gentoo.org, robbat2@gentoo.org, toolchain@gentoo.org, suse@gentoo.org, llvm@gentoo.org, =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH v2 04/12] dev-util/ccache: Use dev-util/shadowman for postinst/prerm Date: Sun, 20 Aug 2017 12:26:51 +0200 Message-Id: <20170820102659.19050-4-mgorny@gentoo.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170820102659.19050-1-mgorny@gentoo.org> References: <20170817083641.3507-1-mgorny@gentoo.org> <20170820102659.19050-1-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: 5e7bf412-d8be-4075-b751-8389b50dd9f0 X-Archives-Hash: 8acc6ac93d854b76bf31d2b66c526599 --- dev-util/ccache/ccache-3.3.4-r1.ebuild | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) changes in v2: do not apply magic when ROOT!=/ diff --git a/dev-util/ccache/ccache-3.3.4-r1.ebuild b/dev-util/ccache/ccache-3.3.4-r1.ebuild index 2fd005d88041..4b0d4dddc994 100644 --- a/dev-util/ccache/ccache-3.3.4-r1.ebuild +++ b/dev-util/ccache/ccache-3.3.4-r1.ebuild @@ -17,6 +17,7 @@ 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 -- 2.14.1