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

Re: Help with configuration order



Norbert Preining <preining@logic.at> wrote:

> Hi Frank!
>
> On Fre, 23 Dez 2005, Frank Küster wrote:
>> >> Furthermore, it only happens if 50cyrtexinfo.cnf is changed (the comment
>> >> sign is removed), and thus only affects systems where texinfo once was
>> >> already installed and configured.  
>> >
>> > No, it is completely *independent* of 50cyrtexinfo.cnf. I am speaking
>> > about the texlive-base-bin fmt.d config file, which includes the lines
>> > for metafont (mf)!
>> 
>> Then wouldn't the solution be to run "fmtutil-sys --byfmt cyrtexinfo"
>> instead of "fmtutil-sys --missing"?  You'd have to check for the "no
>> information for format `cyrtexinfo'" message, and not give an error in
>> this case.
>
> That would be a short term solution. What if some other package decides
> to call itself aaaaaaaa, and decides to call fmtutil-sys --missing in
> the postinst script. Furthermore it does not depend in any way on any
> tex system (ok, I know ...). Then, the exact same situation can happen.

I don't think this is a short-term solution.  *Normally* a package that
wants to execute fmtutil-sys (which is provided by a TeX system) in its
postinst will have to depend on a TeX system.  In the rare cases where
this is not appropriate (e.g. with texinfo), the postinst has to take
special care whether the call is possible, anyway:  It has to check
whether fmtutil-sys is present, and if the ini file is also in a
separate package it must make sure that the postinst won't fail if that
separate package is installed but not configured (TEXINPUTS settings to
find al files or the like).  

So why not require that it also tests more things, or ignores errors?  

By the way, I didn't test it, but meanwhile I must say that I don't
believe that using --byfmt instead of --missing will help:  Generating
the cyrtexinfo format needs pdfetex, and this in turn needs lots of
libraries[1], too.

Why don't you do it that way:

1. parse fmtutil.cnf: is cyrtexinfo enabled?

2. If no, be done; if yes, check whether fmtutil or fmtutil-sys does
   exist 

3. If no, be done; if yes, make sure pdfetex (or the engine specified in
   fmtutil.cnf) is in the path and run

   echo "\\bye" | /usr/bin/pdfetex >/dev/null 2>&1

   (don't forget to remove texput.log)

4. If this command succeeds, run fmtutil-sys --byfmt curtexinfo,
   otherwise don't do anything.

Regards, Frank

[1] BTW you should really consider to apply
http://svn.debian.org/wsvn/pkg-tetex/tetex-bin/trunk/debian/patches/patch-poppler?op=file&rev=0&sc=0
to texlive's pdftex.

-- 
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer



Reply to: