From a16a17a3b8e8c9b137d093bdba652aea1e8fe77d Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 26 Jun 2017 15:13:31 -0700 Subject: [PATCH] app-text/calibre: revbump to 3.1.1-r2 with fix for bug 622728 Indentify and purge stray directories from upstream's "Binary install" method. Package-Manager: Portage-2.3.6, Repoman-2.3.2 --- ...e-3.1.1-r1.ebuild => calibre-3.1.1-r2.ebuild} | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) rename app-text/calibre/{calibre-3.1.1-r1.ebuild => calibre-3.1.1-r2.ebuild} (93%) diff --git a/app-text/calibre/calibre-3.1.1-r1.ebuild b/app-text/calibre/calibre-3.1.1-r2.ebuild similarity index 93% rename from app-text/calibre/calibre-3.1.1-r1.ebuild rename to app-text/calibre/calibre-3.1.1-r2.ebuild index 4e9fbac4f7fd..46710a8a8454 100644 --- a/app-text/calibre/calibre-3.1.1-r1.ebuild +++ b/app-text/calibre/calibre-3.1.1-r2.ebuild @@ -249,7 +249,23 @@ src_install() { } +pkg_preinst() { + # Indentify stray directories from upstream's "Binary install" + # method (see bug 622728). + CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre + CALIBRE_LIB_CONTENT=$(for x in "${ED%/}${CALIBRE_LIB_DIR}"/*; do + printf -- "${x##*/} "; done) || die "Failed to list ${ED%/}${CALIBRE_LIB_DIR}" +} + pkg_postinst() { + [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset" + local x + for x in "${EROOT%/}${CALIBRE_LIB_DIR}"/*; do + if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then + elog "Purging '${x}'" + rm -rf "${x}" + fi + done fdo-mime_desktop_database_update fdo-mime_mime_database_update } -- 2.26.2