6

On page 27, the kpathsea manual states:

  • [A search path is a colon-separated list of path elements.]
  • ...
  • To check a particular path element e, Kpathsea first sees if a prebuilt database applies to e, i.e., if the database is in a directory that is a prefix of e. If so, the path specification is matched against the contents of the database.

A few things aren't clear in the last sentence of this description. I'd be much obliged if somebody could point me to a more accurate description or provide an explanation how it works. The following are some questions I have.

  1. The path element e may have several prefixes. In what order are they searched? For example, if e is equal to /a/b/c, then /a and /a/b are both prefixes of e. (I suspect the order is given by: longest prefix first ... shortest prefix last.)
  2. Is e a prefix of itself? (I supect yes.)

The following is a possible solution to Question 1. Could it be that there is an implicit assumption that there may be at most one prefix of any path element that can may an ls-R database? If so, should the directory containing the ls-R database be in TEXMFDBS? It would make sense. For example, find /usr/local/texlive -name ls-R gives:

/usr/local/texlive/texmf-local/ls-R
/usr/local/texlive/2011/texmf/ls-R
/usr/local/texlive/2011/texmf-dist/ls-R
/usr/local/texlive/2011/texmf-var/ls-R
/usr/local/texlive/2011/texmf-config/ls-R

and kpsewhich -var-value=TEXMFDBS gives:

{!!/usr/local/texlive/2011/texmf-config,
!!/usr/local/texlive/2011/texmf-var,
!!/usr/local/texlive/2011/texmf,
!!/usr/local/texlive/2011/../texmf-local,
!!/usr/local/texlive/2011/texmf-dist}

EDIT (2 March, 2012) I sent an email to the kathsea mailing list. I got a reply from Karl Berry suggesting that there should be no more than one ls-R database along one path leading from the root to any leaf. Also, the directory containing the ls-R database should be in TEXMFDBS.

1 Answer 1

4

The expert suggests that there should be no more than one ls-R database along one path leading from the root to any leaf. Also, the directory containing the ls-R database should be in TEXMFDBS.

0

You must log in to answer this question.