[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: Bruno Haible
Subject: Re: Bug#284637: wrong location or perms on /usr/bin/gettext.sh (fwd)
Date: Fri, 10 Dec 2004 21:58:02 +0100
User-agent: KMail/1.5

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

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/.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]