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

Bug#750496: texlive-xetex crashes install



modified  that allows things to run:

root@beaglebone:/var/lib/dpkg/info# cat texlive-xetex.postinst
#!/bin/sh

exit 0

set -e
# Automatically added by dh_installtex
##
## postinst-tex
##
## postinst snippets for everything TeX related (mktlsr, hyphenation
## patterns, formats, font maps)
##
## Authors:
##       Florent Rougon <f.rougon@free.fr>
##       Norbert Preining <preining@logic.at>
##
#

TEXMFTREES="/usr/share/texmf /var/lib/texmf"
FULLTEXMFTREES="$TEXMFTREES /usr/share/texlive/texmf /usr/share/texlive/texmf-dist"

#
#
dhit_libkpathsea_configured ()
{
    kpsewhich --version >/dev/null 2>&1
}

dhit_update_lsr_files ()
{
    tempfile=$(mktemp -p /tmp mktexlsr.XXXXXXXX)
    printf "Running mktexlsr. This may take some time... "
    if mktexlsr $* > $tempfile 2>&1 ; then
        rm -f $tempfile
        echo "done."
    else
        exec >&2
        echo
        echo "mktexlsr $* failed. Output has been stored in"
        echo "$tempfile"
        echo "Please include this file if you report a bug."
        echo
        exit 1
    fi
}


dhit_build_hyphen_format_if_format_exists ()
{
    v=$(kpsewhich -var-value TEXMFSYSVAR)
    c=$(kpsewhich -var-value TEXMFSYSCONFIG)
    TEXMFVAR="$v"
    TEXMFCONFIG="$c"
    export TEXMFVAR TEXMFCONFIG
    fmtcnffile=$(kpsewhich --format='web2c files' fmtutil.cnf)
    X=$(grep "^[[:space:]]*$1[[:space:]]" $fmtcnffile || true)
    if [ -n "$X" ] ; then
        dhit_build_format --byhyphen "$2"
    fi
}

dhit_build_format ()
{

    tempfile=$(mktemp -p /tmp fmtutil.XXXXXXXX)
    printf "Building format(s) $*.\n\tThis may take some time... "
    if fmtutil-sys "$@" > $tempfile 2>&1 ; then
        rm -f $tempfile
        echo "done."
    else
        exec >&2
        echo
        echo "fmtutil-sys failed. Output has been stored in"
        echo "$tempfile"
        echo "Please include this file if you report a bug."
        echo
        exit 1
    fi
}


case "$1" in
    configure|abort-upgrade|abort-remove|abort-deconfigure)
        update-updmap --quiet
        update-language
        update-fmtutil
        if dhit_libkpathsea_configured; then
            #
            do_lsr=0
            for i in format lsrfull ; do
                if [ "$i" = lsrfull ] ; then
                    TEXMFTREES=$FULLTEXMFTREES
                fi
                if [ "$i" = allformats ] ; then
                    do_lsr=1
                fi
                if [ "$i" = format ] ; then
                    do_lsr=1
                fi
            done
            if [ $do_lsr = 1 ] ; then
                if which mktexlsr >/dev/null; then
                    dhit_update_lsr_files $TEXMFTREES
                fi
            fi
            for i in format lsrfull ; do
                if [ "$i" = lsr ] ; then
                    if [ $do_lsr = 0 ] ; then
                        update-texmf-config lsr
                    fi
                fi
                if [ "$i" = lsrfull ] ; then
                    if [ $do_lsr = 0 ] ; then
                        update-texmf-config lsrfull
                    fi
                fi
                if [ "$i" = map ] ; then
                    update-texmf-config map
                fi
                if [ "$i" = allformats ] ; then
                    dhit_build_format --all
                fi
                if [ "$i" = format ] ; then
                    for fmt in 10texlive-xetex ; do
                        if [ -r "/etc/texmf/fmt.d/$fmt.cnf" ] ; then
                            dhit_build_format --all --cnffile "/etc/texmf/fmt.d/$fmt.cnf"
                        else
                            echo "config file /etc/texmf/fmt.d/$fmt.cnf not available"
                        fi
                    done
                fi
                if [ "$i" = hyphen ] ; then
                    update-texmf-config hyphen
                fi
            done
        fi
    ;;

esac

# End automatically added section

************************************************************************************************************************************************************************************8

#original script

root@beaglebone:/var/lib/dpkg/info# cat texlive-xetex.postinst
#!/bin/sh

set -e
# Automatically added by dh_installtex
##
## postinst-tex
##
## postinst snippets for everything TeX related (mktlsr, hyphenation
## patterns, formats, font maps)
##
## Authors:
##       Florent Rougon <f.rougon@free.fr>
##       Norbert Preining <preining@logic.at>
##
#

TEXMFTREES="/usr/share/texmf /var/lib/texmf"
FULLTEXMFTREES="$TEXMFTREES /usr/share/texlive/texmf /usr/share/texlive/texmf-dist"

#
#
dhit_libkpathsea_configured ()
{
    kpsewhich --version >/dev/null 2>&1
}

dhit_update_lsr_files ()
{
    tempfile=$(mktemp -p /tmp mktexlsr.XXXXXXXX)
    printf "Running mktexlsr. This may take some time... "
    if mktexlsr $* > $tempfile 2>&1 ; then
        rm -f $tempfile
        echo "done."
    else
        exec >&2
        echo
        echo "mktexlsr $* failed. Output has been stored in"
        echo "$tempfile"
        echo "Please include this file if you report a bug."
        echo
        exit 1
    fi
}


dhit_build_hyphen_format_if_format_exists ()
{
    v=$(kpsewhich -var-value TEXMFSYSVAR)
    c=$(kpsewhich -var-value TEXMFSYSCONFIG)
    TEXMFVAR="$v"
    TEXMFCONFIG="$c"
    export TEXMFVAR TEXMFCONFIG
    fmtcnffile=$(kpsewhich --format='web2c files' fmtutil.cnf)
    X=$(grep "^[[:space:]]*$1[[:space:]]" $fmtcnffile || true)
    if [ -n "$X" ] ; then
        dhit_build_format --byhyphen "$2"
    fi
}

dhit_build_format ()
{

    tempfile=$(mktemp -p /tmp fmtutil.XXXXXXXX)
    printf "Building format(s) $*.\n\tThis may take some time... "
    if fmtutil-sys "$@" > $tempfile 2>&1 ; then
        rm -f $tempfile
        echo "done."
    else
        exec >&2
        echo
        echo "fmtutil-sys failed. Output has been stored in"
        echo "$tempfile"
        echo "Please include this file if you report a bug."
        echo
        exit 1
    fi
}


case "$1" in
    configure|abort-upgrade|abort-remove|abort-deconfigure)
        update-updmap --quiet
        update-language
        update-fmtutil
        if dhit_libkpathsea_configured; then
            #
            do_lsr=0
            for i in format lsrfull ; do
                if [ "$i" = lsrfull ] ; then
                    TEXMFTREES=$FULLTEXMFTREES
                fi
                if [ "$i" = allformats ] ; then
                    do_lsr=1
                fi
                if [ "$i" = format ] ; then
                    do_lsr=1
                fi
            done
            if [ $do_lsr = 1 ] ; then
                if which mktexlsr >/dev/null; then
                    dhit_update_lsr_files $TEXMFTREES
                fi
            fi
            for i in format lsrfull ; do
                if [ "$i" = lsr ] ; then
                    if [ $do_lsr = 0 ] ; then
                        update-texmf-config lsr
                    fi
                fi
                if [ "$i" = lsrfull ] ; then
                    if [ $do_lsr = 0 ] ; then
                        update-texmf-config lsrfull
                    fi
                fi
                if [ "$i" = map ] ; then
                    update-texmf-config map
                fi
                if [ "$i" = allformats ] ; then
                    dhit_build_format --all
                fi
                if [ "$i" = format ] ; then
                    for fmt in 10texlive-xetex ; do
                        if [ -r "/etc/texmf/fmt.d/$fmt.cnf" ] ; then
                            dhit_build_format --all --cnffile "/etc/texmf/fmt.d/$fmt.cnf"
                        else
                            echo "config file /etc/texmf/fmt.d/$fmt.cnf not available"
                        fi
                    done
                fi
                if [ "$i" = hyphen ] ; then
                    update-texmf-config hyphen
                fi
            done
        fi
    ;;

esac

# End automatically added section


*******************************************************************************************************************************************************************************

you asked me to add set -x.  there is already set -e so should that become set -ex or should set -e be replaced with set-x?

********************************************************************************************************************************************************************************



On Tue, Jun 3, 2014 at 10:57 PM, Norbert Preining <preining@logic.at> wrote:
Yes, but instead put
    set -x
in there and then send me the full output (lots!) of the dpkg run.

------------------------------------------------------------------------
PREINING, Norbert                              http://www.preining.info
JAIST, Japan                                 TeX Live & Debian Developer
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0  ACF0 6CAC A448 860C DC13
------------------------------------------------------------------------

On 2014/06/04, at 14:34, Eric Fort <eric.fort@gmail.com> wrote:

before I ' dpkg --configure -a'  should I remove the "exit 0" I placed at the top of the postinstall script such that it would continue past the error?


On Tue, Jun 3, 2014 at 8:55 PM, Norbert Preining <preining@logic.at> wrote:
On Tue, 03 Jun 2014, Eric Fort wrote:
> packaging works so I defer to you.  Here's the command, run as root in a
> single line and the output:

Ok, so it works. Strange.

Can you run
        dpkg --configure -a
as root?

Norbert

------------------------------------------------------------------------
PREINING, Norbert                               http://www.preining.info
JAIST, Japan                                 TeX Live & Debian Developer
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0  ACF0 6CAC A448 860C DC13
------------------------------------------------------------------------



Reply to: