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

Bug#235401: Solution and partial analysis



Daniel Schepler <schepler@math.berkeley.edu> wrote:

> Package: tetex-bin
> Version: 2.0.2-8
> Severity: grave
>
> When I try to use pbuilder to build a package which Build-Depends on
> tetex-bin, I get the messages:
>
> Setting up tetex-bin (2.0.2-8) ...
> Generating /var/lib/texmf/web2c/texmf.cnf ... done
> Generating /var/lib/texmf/web2c/fmtutil.cnf ... done
> Regenerating /var/lib/texmf/web2c/updmap.cfg ... done
> Running initex. This may take some time. ...
> Error: `tex -ini  -jobname=latex -progname=latex latex.ini' failed
> Error: `etex -ini  -jobname=elatex -progname=elatex *elatex.ini' failed
> Error: `pdftex -ini  -jobname=pdflatex -progname=pdflatex pdflatex.ini' failed
> Error: `pdfetex -ini  -jobname=pdfelatex -progname=pdfelatex *pdfelatex.ini' failed
> Error: `omega -ini  -jobname=lambda -progname=lambda lambda.ini' failed
> fmtutil: /usr/share/texmf/web2c/omega.oft installed.

So, first of all, excuses to the apt people for bothering them. Of
course we do make use of apt-utils, though indirectly - without them
config is run only in the configure phase from postinst.

Second, I still don't know why the bug is triggered only when apt-utils
is missing, i.e. when config is run after unpacking. But this should be
easy to find out, I just have some life to live this evening.

Third, here's the analysis and solution:

When tetex-bin is installed with DEBIAN_FRONTEND=noninteractive, the
variable DEFAULTS is empty, and thus 

    DEFAULTS_MERGED="$DEFAULTS, $DEFAULTS_ADD"

is something like ", ngerman"

Later, this , gives an empty string, and we uncomment a line that
matches "%! nothing".

This is fixed by the second hunk in the patch below, the first hunk is
just a byproduct - or rather not. I am sure there's something else
that's odd and makes us depend on the order unpacking vs. running
configure. But under the circumstances given currently, my patch fixes
the bug.

Regards, Frank

--- debian/config.orig	Tue Mar  2 19:50:14 2004
+++ debian/config	Tue Mar  2 19:50:26 2004
@@ -64,8 +64,7 @@
   # get non-comment, non-blank, non-alias lines, then filter out 
   # american and nohyphenation
   egrep -v '^[[:blank:]]*%|^[[:blank:]]*$|^[[:blank:]]*=' $file | \
-    egrep -v 'american|nohyphenation'  > $tempfile
-
+    egrep -v 'american|nohyphenation'  > $tempfile || true
   for language in $LDAT_PATTERNS; do
     if grep  $language $tempfile >/dev/null 2>&1; then
       # we found the pattern in current language.dat, use it also
@@ -217,7 +216,7 @@
     # pick out double occurences
     DEFAULT_ANS=`echo -n "$DEFAULTS_MERGED" | \
     tr -d ',' | tr ' ' '\n' | sort -u | tr '\n' ',' | \
-    sed 's/,$//' | sed 's/,/, /g'`
+    sed 's/,$//' | sed 's/^,//' | sed 's/,/, /g'`
   else
     DEFAULT_ANS="$DEFAULTS"
   fi


-- 
Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie



Reply to: