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

Bug#382861: Updating Sarge teTeX to etch/sid TeX live ... help



Norbert Preining <preining@logic.at> wrote:

> Frank: Do you remove old config files from tetex2, or are they all
> overwritten anyway?

I wanted to answer "no, this is somehow handled by dpkg", because that's
what I found when researching this morning.  However, I missed that the
file /etc/texmf/fmt.d/00tetex.cnf is in tetex-bin in sarge.  This is
from our preinst:

    # rename 00tetex.cnf to 01tetex.cnf
    if [ -f $ETCTEXMF/fmt.d/00tetex.cnf ]; then 
      if [ ! -f $ETCTEXMF/fmt.d/01tetex.cnf ]; then
        # not yet transitioned
        mv $ETCTEXMF/fmt.d/00tetex.cnf $ETCTEXMF/fmt.d/01tetex.cnf
      else
        # some older experimental version has installed the new file, but not 
        # transitioned the old one.
        current_md5sum=`md5sum $ETCTEXMF/fmt.d/00tetex.cnf | cut -d ' ' -f 1`
        if [ "$current_md5sum" = "55811af3562faf342261dbc3b5e060a2" ]; then
          rm $ETCTEXMF/fmt.d/00tetex.cnf
        else
          # we do nothing; experimental users should be able to solve this
          :
        fi
      fi
    fi

Later in the script, we try to handle it again - this is both useless
and buggy:

    # rename, file unchanged - hope this works
    fmtdir=/etc/texmf/fmt.d
    if [ -f $fmtdir/00tetex.cnf ] &&  [ -f $fmtdir/01tetex.cnf ]; then
      mv $fmtdir/00tetex.cnf $fmtdir/01tetex.cnf
    fi
    ;;

In the postinst script, ucf is used to handle it and prevent bogus
conffile prompts.

So, do we need to change this, and what should texlive do?  Obviously,
we should drop the second part.  I think the first part can be kept as
it is, except for adaptations to texlive's existence.

What should texlive do?  There are two possible approaches:

- Either add a magic comment line (and maybe less magic comments with an
  explanation), possibly with the help of ucf, and rename it to
  01tetex.cnf 

- Or just move it to 00tetex.cnf.texlive-backup or similar and let tetex
  pick it up again if it is again installed.

The first option would make simpler code in tetex.  And actually it
would only require to put the new 01tetex.cnf and its md5sum file into
tex-common, then both tetex-bin and texlive can do the move.  We could
even put the whole preinst and postinst code into a script in
tex-common, so that texlive (and tetex-bin) need not do anything but
call that script in both maintainer scripts.

Regards, Frank

P.S. this is the only file in tetex-bin that is handled by ucf.  No
surprises to expect from there.  tetex-base only handles texdocrc by
ucf - here there's no conflict possible with texlive
-- 
Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)



Reply to: