[PATCH 2/2] basedir: Add XDG_BIN_HOME and XDG_BIN_DIRS
Lennart Poettering
mzkqt at 0pointer.de
Tue Aug 29 16:55:59 UTC 2017
On Di, 29.08.17 18:42, Johannes Löthberg (johannes at kyriasis.com) wrote:
> + <listitem>
> + <para>
> + There is a set of preference ordered base directories relative to
> + which executable files should be searched. This set of directories
> + is defined by the environment variable <literal>$XDG_BIN_DIRS</literal>.
> + </para>
> + </listitem>
This appears redundant, given that there's already $PATH which pretty
much does this. I think instead of the above there should be a brief
comment, that $PATH is the search counterpart here...
> <listitem>
> <para>
> There is a set of preference ordered base directories relative to
> @@ -122,6 +145,12 @@
> <literal>$XDG_CONFIG_HOME</literal> is either not set or empty, a default equal to
> <literal>$HOME</literal>/.config should be used.
> </para>
> + <para>
> + <literal>$XDG_BIN_HOME</literal> defines the base directory relative to
> + which user-specific executable files should be stored. If
> + <literal>$XDG_BIN_HOME</literal> is either not set or empty, a default equal to
> + <literal>$HOME</literal>/.local/bin should be used.
> + </para>
A problem with ~/.local/bin is that $HOME might be shared between
systems of different archs, and thus any compiled binaries dropped in
this dir might cause problems when used from other systems. I don't
think this issue is reason enough not to have ~/.local/bin, in
particular as many distros and systems already have it and it is a
good idea to document what is already established, but I am very sure
the spec should document the issue at least, and maybe suggests that
scripts rather than arch-specific binaries are preferably placed
there, or that if arch-specific binaries are placed there $HOME
becomes arch-specific to some degree, which is probably not even a
problem in 99.9% of the cases, and hence acceptable in the local case.
Lennart
--
Lennart Poettering, Red Hat
More information about the xdg
mailing list