{
EDIT: tpowa pointed out that 'which' does not exist at this point.
Convert to [ -x /usr/bin/install-info ] format, and use the full path
everywhere just to be sure
}
This idea is Thomas', I take no credit, except that I actually wrote it up.
The idea:
texinfo, on install, processes all info files. bash and glibc (and,
likely, other packages in core) no longer need to depend on texinfo,
but should check for install-info in the scriptlets before running.
a) user installs bash and glibc. No info files are processed, texinfo
not installed
user then installs texinfo, all info files are processed
b) user installs texinfo first (somehow)
user then installs bash, info files processed due to existence of
install-info
c) user follows case a or b
user upgrades bash or glibc, info files processed as normal due to
presence of install-info
Any issues with this? See attached patch. Please review. If possible,
this needs to go to core before we release the ISOs.
Index: bash/trunk/PKGBUILD
===================================================================
--- bash/trunk/PKGBUILD (revision 25717)
+++ bash/trunk/PKGBUILD (working copy)
@@ -4,7 +4,7 @@
pkgname=bash
_patchlevel=048
pkgver=3.2.$_patchlevel
-pkgrel=2
+pkgrel=3
pkgdesc="The GNU Bourne Again shell"
arch=(i686 x86_64)
license=('GPL')
Index: bash/trunk/bash.install
===================================================================
--- bash/trunk/bash.install (revision 25717)
+++ bash/trunk/bash.install (working copy)
@@ -2,8 +2,9 @@
info_files=(bash.info)
post_install() {
+ [ -x /usr/bin/install-info ] || return
for f in ${info_fil...@]}; do
- install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ /usr/bin/install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
done
}
@@ -12,8 +13,9 @@
}
pre_remove() {
+ [ -x /usr/bin/install-info ] || return
for f in ${info_fil...@]}; do
- install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ /usr/bin/install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
done
}
# vim:set ts=2 sw=2 et:
Index: texinfo/trunk/texinfo.install
===================================================================
--- texinfo/trunk/texinfo.install (revision 25717)
+++ texinfo/trunk/texinfo.install (working copy)
@@ -2,13 +2,15 @@
filelist=(info.info.gz info-stnd.info.gz texinfo.gz texinfo-1.gz texinfo-2.gz texinfo-3.gz)
post_install() {
- for file in ${fileli...@]}; do
- install-info $infodir/$file $infodir/dir 2> /dev/null
+ for file in $(find $infodir -type f ! -name dir); do
+ install-info $file $infodir/dir 2> /dev/null
done
}
post_upgrade() {
- post_install $1
+ for file in ${fileli...@]}; do
+ install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
}
pre_remove() {
Index: glibc/trunk/PKGBUILD
===================================================================
--- glibc/trunk/PKGBUILD (revision 25717)
+++ glibc/trunk/PKGBUILD (working copy)
@@ -4,7 +4,7 @@
pkgname=glibc
pkgver=2.9
-pkgrel=2
+pkgrel=3
_glibcdate=20081119
install=glibc.install
backup=(etc/locale.gen)
@@ -13,7 +13,7 @@
license=('GPL' 'LGPL')
url="http://www.gnu.org/software/libc"
groups=('base')
-depends=('sh' 'kernel-headers>=2.6.27.6' 'tzdata' 'texinfo')
+depends=('sh' 'kernel-headers>=2.6.27.6' 'tzdata')
makedepends=('gcc>=4.3.2-2')
replaces=('glibc-xen')
source=(ftp://ftp.archlinux.org/other/glibc/${pkgname}-${pkgver}_${_glibcdate}.tar.bz2
Index: glibc/trunk/glibc.install
===================================================================
--- glibc/trunk/glibc.install (revision 25717)
+++ glibc/trunk/glibc.install (working copy)
@@ -34,8 +34,9 @@
fi
fi
+ [ -x /usr/bin/install-info ] || return
for file in ${fileli...@]}; do
- install-info $infodir/$file $infodir/dir 2> /dev/null
+ /usr/bin/install-info $infodir/$file $infodir/dir 2> /dev/null
done
}
@@ -121,13 +122,15 @@
fi
fi
+ [ -x /usr/bin/install-info ] || return
for file in ${fileli...@]}; do
- install-info $infodir/$file $infodir/dir 2> /dev/null
+ /usr/bin/install-info $infodir/$file $infodir/dir 2> /dev/null
done
}
pre_remove() {
+ [ -x /usr/bin/install-info ] || return
for file in ${fileli...@]}; do
- install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ /usr/bin/install-info --delete $infodir/$file $infodir/dir 2> /dev/null
done
}