libtool
[Top][All Lists]
Advanced

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

Re: Problems with test -L on Solaris


From: Albert Chin-A-Young
Subject: Re: Problems with test -L on Solaris
Date: Sun, 22 Apr 2001 12:20:52 -0500
User-agent: Mutt/1.1.12i

On Sun, Apr 22, 2001 at 01:19:03PM +0200, Peter Eisentraut wrote:
> Albert Chin-A-Young writes:
> 
> > Because of this, the following code snippet in ltmain.in will always
> > fail (and thus 'make uninstall' will always fail on Solaris):
> >   # Don't error if the file doesn't exist and rm -f was used.
> >   if test -L "$file" >/dev/null 2>&1 || test -f "$file"; then
> >     :
> >   elif test -d "$file"; then
> >     exit_status=1
> >     continue
> >   elif test "$rmforce" = yes; then
> >     continue
> >   fi
> 
> I have locally replaced the 'test -L' by 'test -X' (which doesn't work
> with any version of test I have here) and I still got all tests to pass.
> The cited code should still work if you never try to uninstall a symbolic
> link file (which the test suite doesn't do, AFAIK).  Can you take a closer
> look at the test cases, e.g., run 'sh -x xxx.test'?

And you tested this on Solaris? If so, what version? I don't see how
it would work for you.

> > file is a symbolic link (what 'test -L' does).
> 
> Try changing the code to look like this:
> 
>     if test -L "$file" >/dev/null 2>&1 || test -h "$file" >/dev/null 2>&1 || 
> test -f "$file"; then

Well, examine the following:
  $ /bin/sh
  $ test -X "/etc/passwd" || echo foo
  test: argument expected
  $ test -L "/etc/passwd" || echo foo
  test: argument expected

Because the "echo foo" never gets called, it doesn't matter what is
placed after ||.

-- 
albert chin (address@hidden)



reply via email to

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