[PATCH 0/2] XDG basedir bin dirs

Lennart Poettering mzkqt at 0pointer.de
Wed May 2 19:52:44 UTC 2018


On Mi, 02.05.18 12:36, Josh Triplett (josh at joshtriplett.org) wrote:

> > So yeah, Allison also suggested that having a single "XDG_PREFIX" env
> > var would have been the much better option, rather than have
> > individual ones. Now, that ship sailed pretty much, but that's not
> > reason enough to go for XDG_BIN_HOME really. I mean, "~/.local/" is
> > hardcoded as fallback prefix into the spec, so we should just accept
> > that here too, and admit that making this individually configurable
> > wasn't the best of ideas. I mean, making the searhc paths dynamically
> > configurable using an env var by all means made sense, but the "home"
> > dirs? i am not convinced...
> > 
> > But dunno, I am not feeling too strongly about this, but it appeared
> > to me that just not doing an env var here was the best way to get this
> > in quickly...
> 
> In the issue that originally motivated this, multiple people
> specifically requested the ability to customize the target directory,
> because their platform doesn't use ~/.local and wants to put that
> somewhere else. This isn't a "maybe someone might use this someday",
> this is "people specifically asked for this and intend to use it".

Well, it's fine if people use different install prefixes. The question
though is if the xdg basedir spec really needs to care too much about
that. I mean, what matters really is that the XDG basedir spec defines
*search* paths env vars where we previously had none. The *home* paths
otoh are a different story, for them the extra configurability is
entirely unnecessary as I see it, as your app can drop stuff wherever
you want as long as there's a way to register that in the various
search paths. And when you place the stuff at arbitrary places, then
you probably should configure that through a prefix, not through the
individual home dirs of each individual concept...

Hence, I think it's a good thing if the spec defines *search* paths
for everything where we have none before, i.e. to augment UNIX' $PATH,
and Linux' $LD_LIBRARY_PATH and suchlike. I also think it's a good
thing if the spec declares that ~/.local/<something> is a great place
to place stuff, if you are looking for a good place to put something
and didn't get told anything more specific. I also think it's a good
thing if the spec delcares that ~/.local/bin should appear in
$PATH. However, I really don't see the benefit of adding individual
configurability for each of the home dirs, because you should already
have that anyway though the prefix dir you use when configuring your
package...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the xdg mailing list