diff options
author | Ulrich Müller <ulm@gentoo.org> | 2010-09-25 11:32:26 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2010-09-25 11:32:26 +0000 |
commit | 865a446f106d372b3809a6bf7290ed670986a41d (patch) | |
tree | f618701a87f6bc1a7a9151ce685be0c1173002dd /app-editors | |
parent | Revision bump wrt #328189 by Federico Zenith. Fix USE static deps wrt #331739... (diff) | |
download | gentoo-2-865a446f106d372b3809a6bf7290ed670986a41d.tar.gz gentoo-2-865a446f106d372b3809a6bf7290ed670986a41d.tar.bz2 gentoo-2-865a446f106d372b3809a6bf7290ed670986a41d.zip |
Move regeneration of Info dir to pkg_preinst.
(Portage version: 2.2_rc86/cvs/Linux x86_64)
Diffstat (limited to 'app-editors')
-rw-r--r-- | app-editors/emacs-vcs/ChangeLog | 6 | ||||
-rw-r--r-- | app-editors/emacs-vcs/emacs-vcs-23.2.9999.ebuild | 31 | ||||
-rw-r--r-- | app-editors/emacs-vcs/emacs-vcs-24.0.9999.ebuild | 31 |
3 files changed, 35 insertions, 33 deletions
diff --git a/app-editors/emacs-vcs/ChangeLog b/app-editors/emacs-vcs/ChangeLog index 93bd8b12d51d..e2ec7ccde08b 100644 --- a/app-editors/emacs-vcs/ChangeLog +++ b/app-editors/emacs-vcs/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-editors/emacs-vcs # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v 1.25 2010/09/22 20:35:57 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v 1.26 2010/09/25 11:32:26 ulm Exp $ + + 25 Sep 2010; Ulrich Mueller <ulm@gentoo.org> emacs-vcs-23.2.9999.ebuild, + emacs-vcs-24.0.9999.ebuild: + Move regeneration of Info dir to pkg_preinst. 22 Sep 2010; Ulrich Mueller <ulm@gentoo.org> emacs-vcs-24.0.9999.ebuild: Add messages to "die" commands. diff --git a/app-editors/emacs-vcs/emacs-vcs-23.2.9999.ebuild b/app-editors/emacs-vcs/emacs-vcs-23.2.9999.ebuild index eced3ccf9235..b255e544e26f 100644 --- a/app-editors/emacs-vcs/emacs-vcs-23.2.9999.ebuild +++ b/app-editors/emacs-vcs/emacs-vcs-23.2.9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-23.2.9999.ebuild,v 1.2 2010/06/25 17:46:48 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-23.2.9999.ebuild,v 1.3 2010/09/25 11:32:26 ulm Exp $ EAPI=2 @@ -260,20 +260,21 @@ src_install () { dodoc README BUGS || die "dodoc failed" } -emacs-infodir-rebuild() { - # Depending on the Portage version, the Info dir file is compressed - # or removed. It is only rebuilt by Portage if our directory is in - # INFOPATH, which is not guaranteed. So we rebuild it ourselves. - +pkg_preinst() { + # Depending on Portage version and user's settings, the Info dir file + # may have been compressed or removed. We rebuild it in both cases. local infodir=/usr/share/info/${EMACS_SUFFIX} f - [ -d "${ROOT}"${infodir} ] || return # may occur with FEATURES=noinfo - einfo "Regenerating Info directory index in ${infodir} ..." - rm -f "${ROOT}"${infodir}/dir{,.*} - for f in "${ROOT}"${infodir}/*.info*; do - [[ ${f##*/} != *[0-9].info* && -e ${f} ]] \ - && install-info --info-dir="${ROOT}"${infodir} "${f}" &>/dev/null - done - rmdir "${ROOT}"${infodir} 2>/dev/null # remove dir if it is empty + if [ -f "${D}"${infodir}/dir.info ]; then + # prefer existing file if it has survived to here + mv "${D}"${infodir}/dir{.info,} || die "mv dir.info failed" + else + einfo "Regenerating Info directory index in ${infodir} ..." + rm -f "${D}"${infodir}/dir{,.*} + for f in "${D}"${infodir}/*.info*; do + [[ ${f##*/} != *[0-9].info* && -e ${f} ]] \ + && install-info --info-dir="${D}"${infodir} "${f}" &>/dev/null + done + fi } pkg_postinst() { @@ -284,7 +285,6 @@ pkg_postinst() { chown games:games "${ROOT}"/var/lib/games/emacs elisp-site-regen - emacs-infodir-rebuild eselect emacs update ifunset if use X; then @@ -309,6 +309,5 @@ pkg_postinst() { pkg_postrm() { elisp-site-regen - emacs-infodir-rebuild eselect emacs update ifunset } diff --git a/app-editors/emacs-vcs/emacs-vcs-24.0.9999.ebuild b/app-editors/emacs-vcs/emacs-vcs-24.0.9999.ebuild index 4db8325805d5..982f2bf66525 100644 --- a/app-editors/emacs-vcs/emacs-vcs-24.0.9999.ebuild +++ b/app-editors/emacs-vcs/emacs-vcs-24.0.9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.0.9999.ebuild,v 1.11 2010/09/22 20:35:57 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.0.9999.ebuild,v 1.12 2010/09/25 11:32:26 ulm Exp $ EAPI=2 @@ -273,20 +273,21 @@ src_install () { dodoc README BUGS || die "dodoc failed" } -emacs-infodir-rebuild() { - # Depending on the Portage version, the Info dir file is compressed - # or removed. It is only rebuilt by Portage if our directory is in - # INFOPATH, which is not guaranteed. So we rebuild it ourselves. - +pkg_preinst() { + # Depending on Portage version and user's settings, the Info dir file + # may have been compressed or removed. We rebuild it in both cases. local infodir=/usr/share/info/${EMACS_SUFFIX} f - [ -d "${ROOT}"${infodir} ] || return # may occur with FEATURES=noinfo - einfo "Regenerating Info directory index in ${infodir} ..." - rm -f "${ROOT}"${infodir}/dir{,.*} - for f in "${ROOT}"${infodir}/*.info*; do - [[ ${f##*/} != *[0-9].info* && -e ${f} ]] \ - && install-info --info-dir="${ROOT}"${infodir} "${f}" &>/dev/null - done - rmdir "${ROOT}"${infodir} 2>/dev/null # remove dir if it is empty + if [ -f "${D}"${infodir}/dir.info ]; then + # prefer existing file if it has survived to here + mv "${D}"${infodir}/dir{.info,} || die "mv dir.info failed" + else + einfo "Regenerating Info directory index in ${infodir} ..." + rm -f "${D}"${infodir}/dir{,.*} + for f in "${D}"${infodir}/*.info*; do + [[ ${f##*/} != *[0-9].info* && -e ${f} ]] \ + && install-info --info-dir="${D}"${infodir} "${f}" &>/dev/null + done + fi } pkg_postinst() { @@ -297,7 +298,6 @@ pkg_postinst() { chown games:games "${ROOT}"/var/lib/games/emacs elisp-site-regen - emacs-infodir-rebuild eselect emacs update ifunset if use X; then @@ -322,6 +322,5 @@ pkg_postinst() { pkg_postrm() { elisp-site-regen - emacs-infodir-rebuild eselect emacs update ifunset } |