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

Re: debhelper script for maps, languages, formats



On Mon, Jan 16, 2006 at 22:50 +0100, Norbert Preining wrote:
> On Mon, 16 Jan 2006, Ralf Stubner wrote:
> > I am not sure I understand the purpose of
> > 'build_format_if_format_exists' correctly. What's the meaning of the
> > different arguments? 
> 
> Tricky it is:
> 
> Normally it is called with
> 	build_format_if_format_exists --byfmt etex
> then if the etex fmt is present, it is rebuild
> 
> As a special case one can call it like
> 	build_format_if_format_exists --byhyphen latex `kpsewhich language.dat`
> in which case it checks wether the format latex exists in the
> fmtutil.cnf file, and if yes it calls 
> 	fmtutil-sys --byhyphen `kpsewhich language.dat`
> more or less. See below for a rational.
[rational:]
> I used it to build the latex format in case it is installed. Someone may
> install texlive-lang-german *without* installing latex, because he only
> wants to have the german pattens for TeX. Who knows.

Ok, this makes sense. Can this happen for other formats, too? I guess
one of the things that confused me was the hardcoded 'latex' where
build_format_if_format_exists is called. And that it isn't called in the
'normal form' right now.

>  No, because it WAS
> 	fmtutil-sys --listcfg | grep ...
> and then I suddently decided that the fmtutil-sys --listcfg is too slow.

Ah, I understand. Looking at fmtutil --help I just found the option
--catcfg which seems still slower than your method. I am not sure if the
normaliziation and sorting applied by --catcfg is necessary here, but it
looks as if spaces are allowed before the the format name in
fmtutil.cnf. So maybe you ought to grep for something like
"^[[:space:]]*$2[[:space:]]". 

> But now, that you mention it, there is still the problem that an ini
> file is missing but the line activated. Well it shouldn't happen with
> the maig comment stuff, but who knows.

Due to the magic comments this should not happen when packages are
installed or unistalled. But the local admin can always change the
config file to shoot in his own foot. I am not sure if one can (or
should) inhibit this.

cheerio
ralf



Reply to: