[PATCH 0/2] XDG basedir bin dirs
Lennart Poettering
mzkqt at 0pointer.de
Wed May 2 19:13:40 UTC 2018
On Mi, 02.05.18 11:30, Josh Triplett (josh at joshtriplett.org) wrote:
> On Wed, May 02, 2018 at 07:53:47PM +0200, Lennart Poettering wrote:
> > On Di, 29.08.17 18:42, Johannes Löthberg (johannes at kyriasis.com) wrote:
> >
> > heya,
> >
> > > I've had some old patches around for the XDG basedir spec, and figured I
> > > might as well finally send them in and see what people think.
> > >
> > > The first one just reformats some text and fixes some inconsistent
> > > indentation, so should be pretty uncontroversial.
> > >
> > > The second patch adds XDG_BIN_HOME and XDG_BIN_DIRS to the basedir spec,
> > > standardizing ~/.local/bin as the default user-specific bin directory.
> >
> > Sorry for dropping the ball on this one.
> >
> > The whole discussion just came up on fedora devel again, so I figured
> > I really should merge this now. I hence pinged Allison about this, one
> > of the original spec authors, and she suggested we should not define
> > any new env vars but simply document the dir as ~/.local/bin.
>
> While I don't think we need the full complexity of $XDG_BIN_DIRS, having
> $XDG_BIN_HOME to override seems useful, for the same reason as the rest
> of the $XDG_* variables. (With the full benefit of hindsight, I'd have
> suggested having a single $XDG_HOME that defaults to ~/.local, serving as the root for
> everything except $XDG_CONFIG_HOME, so that people could choose to point
> it somewhere other than ~/.local without having to set a pile of
> individual variables, but I don't think we can do anything
> about that now. So given the current state, I think we should have an
> $XDG_BIN_HOME analogous to the other $XDG_* variables to allow people to
> point this elsewhere if they want. If they do, they'll have to take care
> of getting it into $PATH and similar, but tools that install binaries
> can use the desired directory as the target for installation.)
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...
Lennart
--
Lennart Poettering, Red Hat
More information about the xdg
mailing list