diff options
author | Ian Stakenvicius <axs@gentoo.org> | 2017-03-13 11:35:58 -0400 |
---|---|---|
committer | Ian Stakenvicius <axs@gentoo.org> | 2017-03-14 09:40:43 -0400 |
commit | 99b163f52f313d45f9323717a4071586097ffc58 (patch) | |
tree | 15c280c4d66360ec5392c3b6704ba60ad776349f /mail-client/thunderbird | |
parent | x11-wm/stumpwm-contrib: Adds stumpish install (diff) | |
download | gentoo-99b163f52f313d45f9323717a4071586097ffc58.tar.gz gentoo-99b163f52f313d45f9323717a4071586097ffc58.tar.bz2 gentoo-99b163f52f313d45f9323717a4071586097ffc58.zip |
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
Diffstat (limited to 'mail-client/thunderbird')
-rw-r--r-- | mail-client/thunderbird/thunderbird-45.8.0.ebuild | 18 |
1 files 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 c1cb3c2275f4..c167e54982c3 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 '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' /usr/share/enigmail/install.rdf) + emid=$(sed -n '/<em:id>/!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 "<EM:ID> 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 '/<em:id>/!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() { |