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

Re: SVN tex-common commit: r1695 - tex-common/trunk/scripts



Hi Florent, 

On Sat, Oct 07, 2006 at 17:10 +0200, Florent Rougon wrote:
> 
> Just wondering, wouldn't it be safer to use something like that?
> 
> bad_dirs="/usr/share/texmf/web2c /etc/texmf/web2c"
> 
> for d in $bad_dirs; do
>   badly_located_cfg_file="$d/$DEFAULT_OUTPUTFILE_BASENAME"
>   
>   [...]
> 
> done

I don't think this is necessary, since updmap searches its config file
with kpsewhich along this path:

$ kpsewhich --show-path="web2c files" | tr ":" "\n"
/home/ralf/.texmf-config/web2c
/home/ralf/.texmf-var/web2c
/home/ralf/texmf/web2c
/etc/texmf/web2c
!!/var/lib/texmf/web2c
!!/usr/local/share/texmf/web2c
!!/usr/share/texmf/web2c
!!/usr/share/texmf-tetex/web2c
!!/usr/share/texmf-texlive/web2c

The only systemwide directory that is searched before TEXMFSYSVAR
(=/var/lib/texmf) is TEXMFSYSCONFIG (=/etc/texmf). TEXMFSYSCONFIG used
to be /usr/share/texmf, which is why we originaly looked there.

Now as long as the admin does not alter the search path, a file in
/usr/share/texmf/web2c does no harm. And if the admin changes the search
path, then the only save way would be to use kpsewhich (if it is
available) to seach for updmap.cfg and see if the one we are generating
in /var/lib/texmf/web2c is actually the first one to be found.

cheerio
ralf




Reply to: