[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
XDG Base Directory Specification ignores installation directories
From: |
Patrice Dumas |
Subject: |
XDG Base Directory Specification ignores installation directories |
Date: |
Wed, 28 Aug 2024 13:34:23 +0200 |
Hello,
Using the XDG Base Directory Specification is not as straightforward as
what I thought. I have changed my mind compared to my previous
proposition, because interaction between defaults if $XDG_DATA_DIRS is
not set and $datadir installation directory are not really considered by
the specification (I'd say rightly as it is out of scope for the
specification) but we need to make decisions about all that.
Here is my current proposal:
- replace ~/.texinfo by the XDG specification, with $XDG_CONFIG_HOME.
In my opinion, it is an improvement compared to using ~/.texinfo directly
in HOME. The specification is unclear on what should be in $XDG_DATA_HOME
or $XDG_CONFIG_HOME but my feeling is that $XDG_CONFIG_HOME is better.
Still find files in ~/.texinfo/ after specification locations for some
time, with a deprecation message if found in that directory.
- to replace the former search in $datadir/texinfo:
if $XDG_DATA_DIRS is set, search in those directories. Then search
in $datadir (if not already in $XDG_DATA_DIRS). Last search in
/usr/local/share and /usr/share (if not already done), which are
the default for $XDG_DATA_DIRS that have to be used if $XDG_DATA_DIRS
is not set. In what I propose, they are used even if $XDG_DATA_DIRS
is set.
I think that $XDG_DATA_DIRS should be used first as it corresponds
to the users/system preferences. Then $datadir is where the files
have been installed (by the user). The default XDG directories last
can be thought as a way to always have implementation and user preference
independent locations (as a last choice), that could be shared
by other implementations too (texi2html for example). It is not
dedicated to that use, though, as /usr/local/share and /usr/share
could also be in $XDG_DATA_DIRS or correspond to $datadir.
- do the same for $sysconfdir/texinfo as for $datadir/texinfo.
What do you think?
--
Pat
- XDG Base Directory Specification ignores installation directories,
Patrice Dumas <=