[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#284637: wrong location or perms on /usr/bin/gettext.sh (fwd)
From: |
Santiago Vila |
Subject: |
Re: Bug#284637: wrong location or perms on /usr/bin/gettext.sh (fwd) |
Date: |
Fri, 10 Dec 2004 23:01:31 +0100 (CET) |
On Fri, 10 Dec 2004, Bruno Haible wrote:
> martin f krafft <address@hidden> wrote:
> > Package: gettext-base
> > Version: 0.14.1-6
> > Severity: minor
> >
> > /usr/bin/gettext.sh is non-executable and to be sourced by shell
> > scripts. However, the FHS says that /usr/bin is "this is the primary
> > directory of executable commands on the system."
> >
> > If /usr/bin/gettext.sh can be made executable, then please make it.
>
> You shouldn't make it executable. It is not meant to be executed.
>
> > Otherwise, it should be moved to /usr/share/gettext.
>
> This would defeat its purpose: gettext.sh is meant to be sourced from
> shell scripts, using the "." command. This command looks in $PATH, but
> none of the subdirectories of /usr/share/gettext is present in $PATH.
>
> You can also see it this way: POSIX /bin/sh supports the concept of
> functions. As in any programming language, functions can be grouped
> together in a file called "library". As in any programming language,
> such libraries can be loaded. In C it's via dlsym(), in sh it's via ".".
>
> Where does dlsym() look up the libraries? In /usr/lib. So Debian
> installs C libraries in /usr/lib/. Fine.
>
> Where does "." look up the libraries? Anywhere in $PATH. In particular in
> /usr/bin.
>
> If the Debian project designates a particular directory for shell script
> function libraries, and puts this directory in $PATH by default, GNU gettext
> will happily install its contents there.
>
> If it doesn't, then - by the analogy with /usr/lib above - there is nothing
> wrong with gettext.sh in /usr/lib/.
Thanks a lot for the explanation, Bruno.
As Debian does not have any designated directory in the PATH for shell
script function libraries, it clearly follows that /usr/bin is the
only sensible directory where gettext.sh may be placed.
I'm glad that Debian policy does not say that /usr/bin must not contain
non-executables, because that would be a bug in policy :-)
Closing this report (which is not really a bug).