summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2010-09-25 11:32:26 +0000
committerUlrich Müller <ulm@gentoo.org>2010-09-25 11:32:26 +0000
commit41150942acaf210b474c5bb0b5424d57f738853a (patch)
treebb71191aad51752998a5eb7a82395736cf8ccc5f /app-editors/emacs-vcs/emacs-vcs-24.0.9999.ebuild
parentRevision bump wrt #328189 by Federico Zenith. Fix USE static deps wrt #331739... (diff)
downloadhistorical-41150942acaf210b474c5bb0b5424d57f738853a.tar.gz
historical-41150942acaf210b474c5bb0b5424d57f738853a.tar.bz2
historical-41150942acaf210b474c5bb0b5424d57f738853a.zip
Move regeneration of Info dir to pkg_preinst.
Package-Manager: portage-2.2_rc86/cvs/Linux x86_64
Diffstat (limited to 'app-editors/emacs-vcs/emacs-vcs-24.0.9999.ebuild')
-rw-r--r--app-editors/emacs-vcs/emacs-vcs-24.0.9999.ebuild31
1 files changed, 15 insertions, 16 deletions
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
}