Subject: Re: bug#12148: 24.1.50; Tramp has problems with Solaris server (test -e)

From: Carsten Bormann <[email-masked]>
Date: Tue, 7 Aug 2012 18:23:58 +0200

On Aug 7, 2012, at 10:51, Michael Albinus <[email-masked]> wrote:

> Carsten Bormann <[email-masked]> writes:
> 
>> This appears to get circumvented correctly once, but the .emacs.d/tramp
>> written out from the first emacs says:
>> 
>>  ("file-exists" "test -e")
>> 
>> which is clearly wrong.
>> So the next incarnation of emacs will no longer work correcly with that
>> Solaris server.
> 
> Hmm. In `tramp-find-file-exists-command', it is correctly tested for
> "test -e", "/bin/test -e" aso. But the cache seems to get the wrong value.
> 
> I would need to analyze the cache operations. Would you, please, apply
> "M-x tramp-cleanup-all-connections" (this also removes cache settings),
> set `tramp-verbose' to 9, and rerun the test? The resulting debug buffer
> shall tell us more.

Interesting.  With tramp-cleanup-all-connections I didn't need the two-step process to trigger the bug.
Again, the problem is that test -e suppresses the rest of the command line in /bin/sh on Solaris, so the first "test -e" fails right away, but is somehow recovered using another attempt that uses test -d. The attempt to find-file (open) .bash_history then completely fails on what seems to be the same kind of "test -e" (hmm, why didn't it do that in my previous tests before I wrote the tramp file).

resulting tramp file as well as debug buffer (slightly sanitized) attached.

Grüße, Carsten