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 4D1CF139694 for ; Tue, 14 Mar 2017 13:40:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D956B21C03C; Tue, 14 Mar 2017 13:40:56 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B54F721C03C for ; Tue, 14 Mar 2017 13:40:56 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 39F31340AD2 for ; Tue, 14 Mar 2017 13:40:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4407667F1 for ; Tue, 14 Mar 2017 13:40:53 +0000 (UTC) From: "Ian Stakenvicius" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ian Stakenvicius" Message-ID: <1489498843.99b163f52f313d45f9323717a4071586097ffc58.axs@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: mail-client/thunderbird/ X-VCS-Repository: repo/gentoo X-VCS-Files: mail-client/thunderbird/thunderbird-45.8.0.ebuild X-VCS-Directories: mail-client/thunderbird/ X-VCS-Committer: axs X-VCS-Committer-Name: Ian Stakenvicius X-VCS-Revision: 99b163f52f313d45f9323717a4071586097ffc58 X-VCS-Branch: master Date: Tue, 14 Mar 2017 13:40:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 07e3d94e-701e-4ec9-bb97-841a980b6840 X-Archives-Hash: 807b792fb723298fb7c8066b5ee7c25f commit: 99b163f52f313d45f9323717a4071586097ffc58 Author: Ian Stakenvicius gentoo org> AuthorDate: Mon Mar 13 15:35:58 2017 +0000 Commit: Ian Stakenvicius gentoo org> CommitDate: Tue Mar 14 13:40:43 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99b163f5 mail-client/thunderbird: fix enigmail symlink installation Limitations in package managers prevent a symbolic link from replacing a directory at merge time. This patch addresses that issue by removing the directory belonging to the currently installed thunderbird in pkg_preinst(). It's been tested against a direct upgrade form 45.7.0 as well as a reinstall, and seems to do the 'right thing' in all cases. Package-Manager: portage-2.3.3 mail-client/thunderbird/thunderbird-45.8.0.ebuild | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/mail-client/thunderbird/thunderbird-45.8.0.ebuild b/mail-client/thunderbird/thunderbird-45.8.0.ebuild index c1cb3c2275f..c167e54982c 100644 --- a/mail-client/thunderbird/thunderbird-45.8.0.ebuild +++ b/mail-client/thunderbird/thunderbird-45.8.0.ebuild @@ -302,9 +302,9 @@ src_install() { fi if use crypt ; then - emid=$(sed -n '//!d; s/.*\({.*}\).*/\1/; p; q' /usr/share/enigmail/install.rdf) + emid=$(sed -n '//!d; s/.*\({.*}\).*/\1/; p; q' "${EPREFIX}"/usr/share/enigmail/install.rdf) if [[ -n ${emid} ]]; then - dosym /usr/share/enigmail ${MOZILLA_FIVE_HOME}/extensions/${emid} + dosym "${EPREFIX}"/usr/share/enigmail ${MOZILLA_FIVE_HOME}/extensions/${emid} else die " tag for installed enigmail could not be found!" fi @@ -325,6 +325,20 @@ src_install() { pkg_preinst() { gnome2_icon_savelist + + # Because PM's dont seem to properly merge a symlink replacing a directory + if use crypt ; then + local emid=$(sed -n '//!d; s/.*\({.*}\).*/\1/; p; q' "${EPREFIX}"/usr/share/enigmail/install.rdf) + if [[ -d "${EPREFIX}${MOZILLA_FIVE_HOME}/extensions/${emid}" ]] ; then + rm -Rf "${EPREFIX}${MOZILLA_FIVE_HOME}/extensions/${emid}" || ( + eerror "Could not remove enigmail directory from previous installation," + eerror "You must remove this by hand and rename the symbolic link yourself:" + eerror + eerror "\t cd ${EPREFIX}${MOZILLA_FIVE_HOME}/extensions" + eerror "\t rm -Rf ${emid}" + eerror "\t mv ${emid}.backup* ${emid}" ) + fi + fi } pkg_postinst() {