[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17840: [PATCH] libtool: Use 'file' instead of '/usr/bin/file' on GNU

From: Ralf Corsepius
Subject: bug#17840: [PATCH] libtool: Use 'file' instead of '/usr/bin/file' on GNU systems.
Date: Tue, 24 Jun 2014 18:08:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 06/24/2014 04:37 PM, Ludovic Courtès wrote:
Bob Friesenhahn <address@hidden> skribis:

On Mon, 23 Jun 2014, Ludovic Courtès wrote:


The patch below changes occurrences of ‘/usr/bin/file’ to just ‘file’.

The impetus is that on systems using GNU Guix, NixOS, GoboLinux, and
others, the ‘file’ command is not available as /usr/bin/file, so it must
instead be taken from $PATH.

(I conservatively left ‘/usr/bin/file’ for more centralized systems such
as BSD, IRIX, etc. where it’s more likely to be a valid command.)

Were you able to re-test on all of the impacted platforms?

No, but that list is verrry long.

Makes me wonder, why this issue has not come up before and what your issue actually is.

The reason for the hard-coded path is because there are a number of
different 'file' programs and libtool expects particular output from
the 'file' program that it uses.  If the 'file' encountered via PATH
is not the same as the common one available as ‘/usr/bin/file’ on GNU
systems, then there would be a problem.

Well, the systems I was referring to are GNU systems too.  ;-)

Do you remember what other ‘file’ programs could interfere?

Any arbitrary "file" a user may have on $PATH.

Actually, in Fedora's packaging, we generally prefer absolute paths over plain "file names", to avoid malfunctions from arbitrary stuff people may have laying around on $PATH.

Besides, relying on file names to identify programs seems fragile:
Correct. Trying to utilize "file"'s output to distinguish file types has a long history of breaking things and not being robust.


reply via email to

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