Re: [PATCH 2/2] basedir: Add XDG_BIN_HOME and XDG_BIN_DIRS

Lennart Poettering <[email protected]>
Newsgroups gmane.linux.xdg.devel
Message-ID <20170829165559.GC1368@gardel-login>
On Di, 29.08.17 18:42, Johannes Löthberg ([email protected]) 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
_______________________________________________
xdg mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/xdg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.