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 07/12] sys-devel/distcc: Use dev-util/shadowman for postinst/prerm
Date: Thu, 17 Aug 2017 08:40:42
Message-Id: 20170817083641.3507-8-mgorny@gentoo.org
In Reply to: [gentoo-dev] [RFC] [PATCH] dev-util/shadowman: Unified tool to update ccache/distcc/icecc shadow dir by "Michał Górny"
1 ---
2 sys-devel/distcc/distcc-3.2_rc1-r5.ebuild | 22 ++++++++--------------
3 1 file changed, 8 insertions(+), 14 deletions(-)
4
5 diff --git a/sys-devel/distcc/distcc-3.2_rc1-r5.ebuild b/sys-devel/distcc/distcc-3.2_rc1-r5.ebuild
6 index c91826e107c4..226ec963f269 100644
7 --- a/sys-devel/distcc/distcc-3.2_rc1-r5.ebuild
8 +++ b/sys-devel/distcc/distcc-3.2_rc1-r5.ebuild
9 @@ -15,7 +15,7 @@ SRC_URI="https://distcc.googlecode.com/files/${MY_P}.tar.bz2"
10 LICENSE="GPL-2"
11 SLOT="0"
12 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
13 -IUSE="crossdev gnome gssapi gtk hardened ipv6 selinux xinetd zeroconf"
14 +IUSE="gnome gssapi gtk hardened ipv6 selinux xinetd zeroconf"
15
16 RESTRICT="test"
17
18 @@ -35,6 +35,7 @@ DEPEND="${CDEPEND}
19 virtual/pkgconfig"
20 RDEPEND="${CDEPEND}
21 !net-misc/pump
22 + dev-util/shadowman
23 >=sys-devel/gcc-config-1.4.1
24 selinux? ( sec-policy/selinux-distcc )
25 xinetd? ( sys-apps/xinetd )"
26 @@ -155,13 +156,7 @@ src_install() {
27 }
28
29 pkg_postinst() {
30 - if [ -x "${EPREFIX}/usr/bin/distcc-config" ] ; then
31 - if use crossdev; then
32 - "${EPREFIX}/usr/bin/distcc-config" --update-masquerade-with-crossdev
33 - else
34 - "${EPREFIX}/usr/bin/distcc-config" --update-masquerade
35 - fi
36 - fi
37 + eselect compiler-shadow update distcc
38
39 use gnome && xdg_desktop_database_update
40
41 @@ -190,13 +185,12 @@ pkg_postinst() {
42 elog
43 }
44
45 -pkg_postrm() {
46 - # delete the masquerade directory
47 - if [ ! -f "${EPREFIX}/usr/bin/distcc" ] ; then
48 - einfo "Remove masquerade symbolic links."
49 - rm "${EPREFIX}${DCCC_PATH}/"*{cc,c++,gcc,g++}
50 - rmdir "${EPREFIX}${DCCC_PATH}"
51 +pkg_prerm() {
52 + if [[ -z ${REPLACED_BY_VERSION} ]]; then
53 + eselect compiler-shadow remove distcc
54 fi
55 +}
56
57 +pkg_postrm() {
58 use gnome && xdg_desktop_database_update
59 }
60 --
61 2.14.1