bug-coreutils
[Top][All Lists]
Advanced

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

Re: "make check" failure [with "." at beginning of PATH]


From: Bruno Haible
Subject: Re: "make check" failure [with "." at beginning of PATH]
Date: Sat, 9 Feb 2008 13:33:18 +0100
User-agent: KMail/1.5.4

Jim Meyering wrote:
> ... this is the first such failure report I've seen for 6.10.

Of course, I checked the mailing list archive before submitting the report.

> > There are two problems:
> > 1) Backquotes should be used instead of bash-specific syntax.
> 
> Since November, tests and infrastructure can use POSIX-shell syntax
> like $() on most systems.  See the posix-shell gnulib module and
> this change by Paul Eggert:
> 
>   http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=1379ed974

It was luck that my /bin/sh understands the $(...) syntax. The macro in
m4/posix-shell.m4 has two possible outcomes: either it finds a POSIX shell,
or it doesn't. In the latter case, PREFERABLY_POSIX_SHELL will be /bin/sh
and will *not* necessarily support $(...) syntax. But you wrote $(dirname ...)
unconditionally.

> > 2) 'dirname' refers to the program in PATH. My $PATH starts with ".". "." is
> 
> Ah ha!  *That* is the problem.
> Don't put "." in your PATH at all, and especially not at the front.

PATH is a personal preference. Many people set it like I do. Don't expect
that PATH is set like you prefer it.

> If you see an easy, clean fix, then great.

I see two easy, clean fixes:
  - Rename the unit test file 'dirname' to 'test-dirname' or 'dirname-test'
    or 'dirname.sh' or something like this.
  - Use
        sed -e 's,^[^/]*$,.,' -e 's,//*[^/]*$,,'
    instead of dirname.

Bruno





reply via email to

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