> From: Gavin Smith <gavinsmith0...@gmail.com>
> Date: Thu, 26 Sep 2024 22:15:13 +0100
> 
> On Thu, Sep 26, 2024 at 05:26:59PM +0200, Patrice Dumas wrote:
> > 
> > My understanding is that if you want to install on non-standard
> > locations and want to have this non-standard location being searched for
> > before other directories, then you should put first in XDG_DATA_DIRS (or
> > XDG_CONFIG_DIRS).  It should be possible to change
> > XDG_DATA_DIRS/XDG_CONFIG_DIRS as a user or for the system, but it
> > depends on the platform configuration.  It seems to often be in
> > /etc/profile.d/ for system-wide early change of environment variables
> > for GNU/Linux.
> 
> I don't think we should require the user (or distribution maintainer) to
> set XDG_DATA_DIRS/XDG_CONFIG_DIRS to install in non-default locations.
> Users have been able to set datadir with configure scripts for a lot
> longer than the XDG specification has existed.  We should continue
> to check in datadir in line with the long-standing practice of GNU
> programs.
> 
> It may be fine to use the directories in XDG_DATA_DIRS as well as
> $datadir.
> 
> It could depend on the type of file.  A typical "data" file could be
> a font file (under /usr/share/fonts) that could be used by any program,
> not just those from a single package.  In this view "data" is not
> a fixed, necessary part of a single program but sommething that could
> be used by multiple programs.

Are there systems out there where XDG_DATA_DIRS and XDG_CONFIG_DIRS
are set to something different from the defaults?  If there are such
systems, could someone look and tell how packages are configured there
to look for their data/config files?

I'm far from considering myself an expert of this XDG stuff, but we
may be looking at this from a wrong POV, because AFAIU if these
variables are set to different values, it is the job of the system
managers (or the persons who set these XDG variables) to make sure the
system-wide data and config files are installed in those directories,
and configure packages like Texinfo to look there by default.
Anything else will simply not work, at least not reliably.

If I'm right, then there's no reason for Texinfo to look in these
directories _in_addition_ to $datadir etc.; instead, we should assume
that Texinfo was configured with the appropriate --datadir options to
point to those places in the first place.

Reply via email to