On Thu, Aug 29, 2024 at 09:11:20AM +0200, Patrice Dumas wrote:
> I do not think that this is the right way to look at this.  To me the
> logic is that we search both in "config" locations, as it is where the
> system/user may place an htmlxref.cnf files, and we search there first,
> and in "data", which is where the default from texi2any is installed.

It may be too complicated and confusing to look in both.  Do any other
programs look for the same file in both "config" and "data" locations?
The current draft of the documentation lists 13 different locations
that are checked which is a bit overwhelming.


> I proposed and implemented an extension to that logic, by proposing
> a third type of location, with both configuration and data variants,
> which would correspond to runtime and buildtime configuration
> independent locations available for defaults independent of the
> implementation and of any configuration.  I choosed /usr/share and
> /usr/local/share for these locations (it only changes the lookup if
> $datadir is not already /usr/share nor /usr/local/share).

The point of not hard-coding these paths is that multiple independent
installations of Texinfo could be made on the same system and they
would refer to different files.  Hardcoding a shared path regardless
of $prefix seems to take away from the flexibility of use for the
person installing the package.


> I had the idea to add the fixed path by looking at discussions on XDG
> lists where people argued that truely shared/common information must be
> in hard-coded directories, and I agree.  Otherwise there is always the
> "risk" that the shared/common location is not found.

It may depend on the program and the risk of the common location not
being found (e.g., would it stop the user from logging in).  I expect
this would be an exceptional case.

In the case of texi2any, the consequences of the common location not
being found are not so disastrous.

Reply via email to