Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: cluster@g.o, robbat2@g.o, toolchain@g.o, suse@g.o, llvm@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH v2 10/12] sys-devel/icecream: Use dev-util/shadowman for postinst/prerm
Date: Sun, 20 Aug 2017 10:31:40
Message-Id: 20170820102659.19050-10-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH v2 01/12] dev-util/shadowman: New package by "Michał Górny"
1 ---
2 sys-devel/icecream/icecream-1.0.0-r2.ebuild | 13 +++++++++++++
3 1 file changed, 13 insertions(+)
4
5 changes in v2: do not apply magic when ROOT!=/
6
7 diff --git a/sys-devel/icecream/icecream-1.0.0-r2.ebuild b/sys-devel/icecream/icecream-1.0.0-r2.ebuild
8 index 187928a2290d..96a3c171e8a0 100644
9 --- a/sys-devel/icecream/icecream-1.0.0-r2.ebuild
10 +++ b/sys-devel/icecream/icecream-1.0.0-r2.ebuild
11 @@ -17,6 +17,7 @@ KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86"
12 IUSE=""
13
14 RDEPEND="
15 + dev-util/shadowman
16 sys-libs/libcap-ng
17 "
18 DEPEND="${RDEPEND}"
19 @@ -52,3 +53,15 @@ src_install() {
20 insinto /usr/share/shadowman/tools
21 newins - icecc <<<'/usr/libexec/icecc/bin'
22 }
23 +
24 +pkg_prerm() {
25 + if [[ -z ${REPLACED_BY_VERSION} && ${ROOT} == / ]]; then
26 + eselect compiler-shadow remove icecc
27 + fi
28 +}
29 +
30 +pkg_postinst() {
31 + if [[ ${ROOT} == / ]]; then
32 + eselect compiler-shadow update icecc
33 + fi
34 +}
35 --
36 2.14.1