app-editors/emacs: Remove compatibility code in pkg_preinst.
authorUlrich Müller <ulm@gentoo.org>
Fri, 22 Nov 2019 11:09:41 +0000 (12:09 +0100)
committerUlrich Müller <ulm@gentoo.org>
Fri, 22 Nov 2019 11:10:22 +0000 (12:10 +0100)
Needed only for Portage versions from before 2011. Since all ebuilds
are EAPI 7 (approved in 2018), it should be safe to drop this.

Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
app-editors/emacs/emacs-23.4-r18.ebuild
app-editors/emacs/emacs-24.5-r7.ebuild
app-editors/emacs/emacs-25.3-r6.ebuild
app-editors/emacs/emacs-26.2.ebuild
app-editors/emacs/emacs-26.3-r1.ebuild

index a5179566d3f68ede286735ff59abaa6e6e49dd3a..7fa200d71b1cf0ae503e84551f7c5d78c30055be 100644 (file)
@@ -328,19 +328,8 @@ src_install () {
 
 pkg_preinst() {
        # move Info dir file to correct name
-       local infodir=/usr/share/info/${EMACS_SUFFIX} f
-       if [[ -f ${ED}${infodir}/dir.orig ]]; then
-               mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed"
-       elif [[ -d "${ED}"${infodir} ]]; then
-               # this should not happen in EAPI 4
-               ewarn "Regenerating Info directory index in ${infodir} ..."
-               rm -f "${ED}"${infodir}/dir{,.*}
-               for f in "${ED}"${infodir}/*; do
-                       if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then
-                               install-info --info-dir="${ED}"${infodir} "${f}" \
-                                       || die "install-info failed"
-                       fi
-               done
+       if [[ -d ${ED}/usr/share/info ]]; then
+               mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die
        fi
 }
 
index 80d215cacae87b8461b73afe0bb2727a5059d922..7a8a310132f83e6bb501405b6902e3e475be8348 100644 (file)
@@ -322,19 +322,8 @@ src_install () {
 
 pkg_preinst() {
        # move Info dir file to correct name
-       local infodir=/usr/share/info/${EMACS_SUFFIX} f
-       if [[ -f ${ED}${infodir}/dir.orig ]]; then
-               mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed"
-       elif [[ -d "${ED}"${infodir} ]]; then
-               # this should not happen in EAPI 4
-               ewarn "Regenerating Info directory index in ${infodir} ..."
-               rm -f "${ED}"${infodir}/dir{,.*}
-               for f in "${ED}"${infodir}/*; do
-                       if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then
-                               install-info --info-dir="${ED}"${infodir} "${f}" \
-                                       || die "install-info failed"
-                       fi
-               done
+       if [[ -d ${ED}/usr/share/info ]]; then
+               mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die
        fi
 }
 
index 757eadddc093c7779cabca8867c9c880f29827d0..8825e18aa7e97f413f8a50823ee5d937e0d2a1a3 100644 (file)
@@ -330,19 +330,8 @@ src_install () {
 
 pkg_preinst() {
        # move Info dir file to correct name
-       local infodir=/usr/share/info/${EMACS_SUFFIX} f
-       if [[ -f ${ED}${infodir}/dir.orig ]]; then
-               mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed"
-       elif [[ -d "${ED}"${infodir} ]]; then
-               # this should not happen in EAPI 4
-               ewarn "Regenerating Info directory index in ${infodir} ..."
-               rm -f "${ED}"${infodir}/dir{,.*}
-               for f in "${ED}"${infodir}/*; do
-                       if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then
-                               install-info --info-dir="${ED}"${infodir} "${f}" \
-                                       || die "install-info failed"
-                       fi
-               done
+       if [[ -d ${ED}/usr/share/info ]]; then
+               mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die
        fi
 }
 
index 3ac8b0f94daef5a4eb35389300927b2d82d9209c..457aade942a717079ab2708fcda41ffea89f6a95 100644 (file)
@@ -347,18 +347,8 @@ src_install () {
 
 pkg_preinst() {
        # move Info dir file to correct name
-       local infodir=/usr/share/info/${EMACS_SUFFIX} f
-       if [[ -f ${ED}${infodir}/dir.orig ]]; then
-               mv "${ED}"${infodir}/dir{.orig,} || die
-       elif [[ -d "${ED}"${infodir} ]]; then
-               # this should not happen in EAPI 4
-               ewarn "Regenerating Info directory index in ${infodir} ..."
-               rm -f "${ED}"${infodir}/dir{,.*}
-               for f in "${ED}"${infodir}/*; do
-                       if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then
-                               install-info --info-dir="${ED}"${infodir} "${f}" || die
-                       fi
-               done
+       if [[ -d ${ED}/usr/share/info ]]; then
+               mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die
        fi
 }
 
index eeb8091162baac497d5c4a7fdd4cee1dcd7e1fe6..ba2743383655a36d00a3a5f69cb3b1bc4877d128 100644 (file)
@@ -356,18 +356,8 @@ src_install () {
 
 pkg_preinst() {
        # move Info dir file to correct name
-       local infodir=/usr/share/info/${EMACS_SUFFIX} f
-       if [[ -f ${ED}${infodir}/dir.orig ]]; then
-               mv "${ED}"${infodir}/dir{.orig,} || die
-       elif [[ -d "${ED}"${infodir} ]]; then
-               # this should not happen in EAPI 4
-               ewarn "Regenerating Info directory index in ${infodir} ..."
-               rm -f "${ED}"${infodir}/dir{,.*}
-               for f in "${ED}"${infodir}/*; do
-                       if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then
-                               install-info --info-dir="${ED}"${infodir} "${f}" || die
-                       fi
-               done
+       if [[ -d ${ED}/usr/share/info ]]; then
+               mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die
        fi
 }