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 444CD1396D0 for ; Sun, 20 Aug 2017 10:30:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3195A1FC0DB; Sun, 20 Aug 2017 10:27:52 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 DFF441FC0D7 for ; Sun, 20 Aug 2017 10:27:51 +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 AB58634198F; Sun, 20 Aug 2017 10:27:48 +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 07/12] sys-devel/distcc: Use dev-util/shadowman for postinst/prerm Date: Sun, 20 Aug 2017 12:26:54 +0200 Message-Id: <20170820102659.19050-7-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: f5b2cbc2-3237-4bbd-acb7-e02ba84ecbac X-Archives-Hash: e4b7b3eaa6dec07de287caae866cb297 --- sys-devel/distcc/distcc-3.2_rc1-r5.ebuild | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) changes in v2: do not apply magic when ROOT!=/ diff --git a/sys-devel/distcc/distcc-3.2_rc1-r5.ebuild b/sys-devel/distcc/distcc-3.2_rc1-r5.ebuild index c91826e107c4..b658eca32c27 100644 --- a/sys-devel/distcc/distcc-3.2_rc1-r5.ebuild +++ b/sys-devel/distcc/distcc-3.2_rc1-r5.ebuild @@ -15,7 +15,7 @@ SRC_URI="https://distcc.googlecode.com/files/${MY_P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" -IUSE="crossdev gnome gssapi gtk hardened ipv6 selinux xinetd zeroconf" +IUSE="gnome gssapi gtk hardened ipv6 selinux xinetd zeroconf" RESTRICT="test" @@ -35,6 +35,7 @@ DEPEND="${CDEPEND} virtual/pkgconfig" RDEPEND="${CDEPEND} !net-misc/pump + dev-util/shadowman >=sys-devel/gcc-config-1.4.1 selinux? ( sec-policy/selinux-distcc ) xinetd? ( sys-apps/xinetd )" @@ -155,12 +156,8 @@ src_install() { } pkg_postinst() { - if [ -x "${EPREFIX}/usr/bin/distcc-config" ] ; then - if use crossdev; then - "${EPREFIX}/usr/bin/distcc-config" --update-masquerade-with-crossdev - else - "${EPREFIX}/usr/bin/distcc-config" --update-masquerade - fi + if [[ ${ROOT} == / ]]; then + eselect compiler-shadow update distcc fi use gnome && xdg_desktop_database_update @@ -190,13 +187,12 @@ pkg_postinst() { elog } -pkg_postrm() { - # delete the masquerade directory - if [ ! -f "${EPREFIX}/usr/bin/distcc" ] ; then - einfo "Remove masquerade symbolic links." - rm "${EPREFIX}${DCCC_PATH}/"*{cc,c++,gcc,g++} - rmdir "${EPREFIX}${DCCC_PATH}" +pkg_prerm() { + if [[ -z ${REPLACED_BY_VERSION} && ${ROOT} == / ]]; then + eselect compiler-shadow remove distcc fi +} +pkg_postrm() { use gnome && xdg_desktop_database_update } -- 2.14.1