On Fri, May 18, 2007 at 09:10:05AM -0700, Dermot McCluskey wrote:
> > If one compiles and installs GNU-Software with info stuff, the make
> > install takes care of creating/updateing the right dir file (of course,
> > if install-info is not available, there is no harm - one can still
> > update the dir files automatically, when one decides to install install-info
> > ...).
> 
> How would the dir files get updated *automatically*, in this situation?

E.g. starting a 'rebuild-infodir' script, which basically does:

#!/bin/ksh
INFODIR=$1
for f in ${INFODIR}/*; do
        DST=${f##/*}
        if [ "$DST" = "dir" ]; then
                install-info --quiet --delete $f --dir-file=${INFODIR}/dir
                install-info $f --dir-file=${INFODIR}/dir
        fi
done

And as you can see, this is much more "complicated" than correct postremove
scripts, since it actually doesn't know, what info files have been removed 
not using install-info. In this case one need to scan the dir file and
perhaps finds out, what to remove - not sure, whether it can be made as
save/stable as calling install-info in pre*/post* scripts. From software
perspective it would be definitly a bad hack - not more!
A clean alternative: register uninstalled info file names in e.g.
/var/log/info.removed (echo $file >>$removed) and fire later
install-info --delete ... , bla bla bla ...

But hey, why should one make pretty easy things complicated?

Regards,
jel.
-- 
Otto-von-Guericke University     http://www.cs.uni-magdeburg.de/
Department of Computer Science   Geb. 29 R 027, Universitaetsplatz 2
39106 Magdeburg, Germany         Tel: +49 391 67 12768

Reply via email to