cl-projects.de
 
Bauteile-Verwaltung part-db
Tools
Laminator-Umbau

Verschiedenes
miscellaneous stuff

Installing tetex-bin from Debian Etch in 2009

While maintaining a server still running Debian Etch (now called oldstable), I had to install TeX to match a package build dependency.

So I entered apt-get install tetex-bin, but it didn't work as expected. Instead it bombed, printing lots of TeX internals to the terminal:

Setting up tetex-bin (3.0-30) ...

Creating config file /etc/texmf/fmt.d/01tetex.cnf with new version
Running fmtutil-sys. This may take some time... Error: `pdfetex -ini  -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini' possibly failed.
Error: `pdfetex -ini  -jobname=pdflatex -progname=pdflatex -translate-file=cp227.tcx *pdflatex.ini' possibly failed.

###############################################################################
fmtutil: Error! Not all formats have been built successfully.
Visit the log files in directory
  /var/lib/texmf/web2c
for details.
###############################################################################

This is a summary of all `failed' messages and warnings:
`pdfetex -ini  -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini' possibly failed.
`pdfetex -ini  -jobname=pdflatex -progname=pdflatex -translate-file=cp227.tcx *pdflatex.ini' possibly failed.

fmtutil-sys failed. Output has been stored in:
  /tmp/tetex.format_creation.UntA5371/fmtutil-sys.log
Please include this file if you report a bug.
dpkg: error processing tetex-bin (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 tetex-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)
The package file involved is called tetex-bin_3.0-30_i386.deb.

The reason is that the developers coded something that's (usually) quite useful: They inform the users that the stuff they're installing is really old. Here warning prompt, because the package is older than five years. From /var/lib/texmf/web2c/pdflatex.log:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! You are attempting to make a LaTeX format from a source file
! That is more than five years old.
!
! If you enter  to scroll past this message then the format
! will be built, but please consider obtaining newer source files
! before continuing to build LaTeX.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! LaTeX source files more than 5 years old!.
l.540 ...aTeX source files more than 5 years old!}

To avoid this error message, obtain new LaTeX sources.

My "bug-fix" was to change the code creating this message. In file /usr/share/texmf-tetex/tex/latex/base/latex.ltx search for

%%% From File: ltvers.dtx
\def\fmtname{LaTeX2e}
\edef\fmtversion{2003/12/01}
\iftrue
\def\reserved@a#1/#2/#3\@nil{%
  \count@\year
  \advance\count@-#1\relax
  \multiply\count@ by 12\relax
  \advance\count@\month
  \advance\count@-#2\relax}
\expandafter\reserved@a\fmtversion\@nil
\ifnum\count@>65   <-- adjust it here
  \typeout{^^J%
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
!  You are attempting to make a LaTeX format from a source file^^J%
!  That is more than five years old.^^J%

... And change the 65 to 100 or so. 65 stands for 5 years, 6 months, so 100 is OK.

Links

Impressum