public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: cluster@gentoo.org, robbat2@gentoo.org, toolchain@gentoo.org,
	suse@gentoo.org, llvm@gentoo.org,
	"Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH v2 10/12] sys-devel/icecream: Use dev-util/shadowman for postinst/prerm
Date: Sun, 20 Aug 2017 12:26:57 +0200	[thread overview]
Message-ID: <20170820102659.19050-10-mgorny@gentoo.org> (raw)
In-Reply-To: <20170820102659.19050-1-mgorny@gentoo.org>

---
 sys-devel/icecream/icecream-1.0.0-r2.ebuild | 13 +++++++++++++
 1 file changed, 13 insertions(+)

changes in v2: do not apply magic when ROOT!=/

diff --git a/sys-devel/icecream/icecream-1.0.0-r2.ebuild b/sys-devel/icecream/icecream-1.0.0-r2.ebuild
index 187928a2290d..96a3c171e8a0 100644
--- a/sys-devel/icecream/icecream-1.0.0-r2.ebuild
+++ b/sys-devel/icecream/icecream-1.0.0-r2.ebuild
@@ -17,6 +17,7 @@ KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86"
 IUSE=""
 
 RDEPEND="
+	dev-util/shadowman
 	sys-libs/libcap-ng
 "
 DEPEND="${RDEPEND}"
@@ -52,3 +53,15 @@ src_install() {
 	insinto /usr/share/shadowman/tools
 	newins - icecc <<<'/usr/libexec/icecc/bin'
 }
+
+pkg_prerm() {
+	if [[ -z ${REPLACED_BY_VERSION} && ${ROOT} == / ]]; then
+		eselect compiler-shadow remove icecc
+	fi
+}
+
+pkg_postinst() {
+	if [[ ${ROOT} == / ]]; then
+		eselect compiler-shadow update icecc
+	fi
+}
-- 
2.14.1



  parent reply	other threads:[~2017-08-20 10:31 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-17  8:36 [gentoo-dev] [RFC] [PATCH] dev-util/shadowman: Unified tool to update ccache/distcc/icecc shadow dir Michał Górny
2017-08-17  8:36 ` [gentoo-dev] [PATCH 01/12] dev-util/shadowman: New package Michał Górny
2017-08-17  8:36 ` [gentoo-dev] [PATCH 02/12] dev-util/ccache: Convert to EAPI=6 Michał Górny
2017-08-17  8:48   ` David Seifert
2017-08-17  9:00     ` Michał Górny
2017-08-17  9:08       ` David Seifert
2017-08-17  8:36 ` [gentoo-dev] [PATCH 03/12] dev-util/ccache: Install dev-util/shadowman data file Michał Górny
2017-08-17  8:36 ` [gentoo-dev] [PATCH 04/12] dev-util/ccache: Use dev-util/shadowman for postinst/prerm Michał Górny
2017-08-17  8:36 ` [gentoo-dev] [PATCH 05/12] sys-devel/distcc: Convert to EAPI=6 Michał Górny
2017-08-17  8:36 ` [gentoo-dev] [PATCH 06/12] sys-devel/distcc: Install dev-util/shadowman data file Michał Górny
2017-08-17  8:36 ` [gentoo-dev] [PATCH 07/12] sys-devel/distcc: Use dev-util/shadowman for postinst/prerm Michał Górny
2017-08-17  8:36 ` [gentoo-dev] [PATCH 08/12] sys-devel/icecream: Convert to EAPI=6 Michał Górny
2017-08-17  8:36 ` [gentoo-dev] [PATCH 09/12] sys-devel/icecream: Install dev-util/shadowman data file Michał Górny
2017-08-17  8:36 ` [gentoo-dev] [PATCH 10/12] sys-devel/icecream: Use dev-util/shadowman for postinst/prerm Michał Górny
2017-08-17  8:36 ` [gentoo-dev] [PATCH 11/12] toolchain.eclass: Update masquerades via dev-util/shadowman postinst/rm Michał Górny
2017-08-17  8:36 ` [gentoo-dev] [PATCH 12/12] sys-devel/clang: Enable masquerades via dev-util/shadowman Michał Górny
2017-08-17 10:14 ` [gentoo-dev] Re: [RFC] [PATCH] dev-util/shadowman: Unified tool to update ccache/distcc/icecc shadow dir Sergei Trofimovich
2017-08-19 10:19 ` [gentoo-dev] " Manuel Rüger
2017-08-19 10:53   ` Michał Górny
2017-08-19 11:10     ` Manuel Rüger
2017-08-20 10:26 ` [gentoo-dev] [PATCH v2 01/12] dev-util/shadowman: New package Michał Górny
2017-08-20 10:26   ` [gentoo-dev] [PATCH v2 02/12] dev-util/ccache: Convert to EAPI=6 Michał Górny
2017-08-20 10:26   ` [gentoo-dev] [PATCH v2 03/12] dev-util/ccache: Install dev-util/shadowman data file Michał Górny
2017-08-20 10:26   ` [gentoo-dev] [PATCH v2 04/12] dev-util/ccache: Use dev-util/shadowman for postinst/prerm Michał Górny
2017-08-20 10:26   ` [gentoo-dev] [PATCH v2 05/12] sys-devel/distcc: Convert to EAPI=6 Michał Górny
2017-08-20 10:26   ` [gentoo-dev] [PATCH v2 06/12] sys-devel/distcc: Install dev-util/shadowman data file Michał Górny
2017-08-20 10:26   ` [gentoo-dev] [PATCH v2 07/12] sys-devel/distcc: Use dev-util/shadowman for postinst/prerm Michał Górny
2017-08-20 10:26   ` [gentoo-dev] [PATCH v2 08/12] sys-devel/icecream: Convert to EAPI=6 Michał Górny
2017-08-20 10:26   ` [gentoo-dev] [PATCH v2 09/12] sys-devel/icecream: Install dev-util/shadowman data file Michał Górny
2017-08-20 10:26   ` Michał Górny [this message]
2017-08-20 10:26   ` [gentoo-dev] [PATCH v2 11/12] toolchain.eclass: Update masquerades via dev-util/shadowman postinst/rm Michał Górny
2017-08-20 10:26   ` [gentoo-dev] [PATCH v2 12/12] sys-devel/clang: Enable masquerades via dev-util/shadowman Michał Górny
2017-08-21  1:25   ` [gentoo-dev] Re: [PATCH v2 01/12] dev-util/shadowman: New package Duncan

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=20170820102659.19050-10-mgorny@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=cluster@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=llvm@gentoo.org \
    --cc=robbat2@gentoo.org \
    --cc=suse@gentoo.org \
    --cc=toolchain@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