[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dh_installtex and Policy



On Thu, Feb 16, 2006 at 18:00 +0100, Norbert Preining wrote:
> On Don, 16 Feb 2006, Norbert Preining wrote:
> > If you can wait a bit (1h) I write something about dh_isntalltex inthe
> > policy document and cancel all references to dh_installtexfonts.
> 
> Done. Only the appendix is the same. I am not sure what to do with it,
> as we cannot add the code from postinst-tex and postrm-tex as it is a
> bit more complicated. 

One could use postinst-texfonts (plus kpsewhich check) and
postrm-texfonts instead. But I am not sure if all the code with logfiles
that should be included with bug reports should go into the policy. IMO,
the postrm script in the policy can still be used. For the postinst I
would suggest to add the check for kpsewhich:

######################################
#
# postinst-texfonts
#
# postinst snippets for installing fonts for TeX
#
# Author: Florent Rougon <f.rougon@free.fr>
#
update_fontmaps()
{
    update-updmap --quiet
    # all of the following needs an installed and configured
    # base TeX system, so check this
    if kpsewhich --version > /dev/null 2>&1 ; then
        # mktexlsr is recommended now because updmap-sys relies
        # heavily on Kpathsea to locate updmap.cfg and the map files.
        # Also, it is slightly better not to specify a particular
        # directory to refresh because updmap.cfg is typically found
        # in $TEXMFSYSVAR while the map files are in $TEXMFMAIN.
        if which mktexlsr >/dev/null; then mktexlsr; fi
        if which updmap-sys >/dev/null; then
            printf "Running updmap-sys. This may take some time ... "
            updmap-sys --quiet
            echo "done."
        fi
    fi

    return 0
}

case "$1" in
    configure|abort-upgrade|abort-remove|abort-deconfigure)
        update_fontmaps
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac
######################################

BTW, postinst-tex calls mktexlsr (if it exists) before checking
kpsewhich, even though mktexlsr uses kpsewhich internally.

cheerio
ralf



Reply to: