GNU bug report logs -
#12148
24.1.50; Tramp has problems with Solaris server (test -e)
Previous Next
Reported by: Carsten Bormann <cabo <at> tzi.org>
Date: Mon, 6 Aug 2012 15:32:01 UTC
Severity: normal
Found in version 24.1.50
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 12148 <at> debbugs.gnu.org (full text, mbox):
Carsten Bormann <cabo <at> tzi.org> writes:
Hi Carsten,
> 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).
I've hardened the test a little bit. Could you, please, check whether
this works (clean the cache first):
--8<---------------cut here---------------start------------->8---
*** ~/src/tramp/lisp/tramp-sh.el.~2.77~ 2012-08-08 08:40:59.692792871 +0200
--- ~/src/tramp/lisp/tramp-sh.el 2012-08-08 08:40:33.696337454 +0200
***************
*** 3559,3584 ****
;; `/usr/bin/test'.
;; `/usr/bin/test -e' In case `/bin/test' does not exist.
(unless (or
! (and (setq result (format "%s -e" (tramp-get-test-command vec)))
! (tramp-send-command-and-check
! vec (format "%s %s" result existing))
! (not (tramp-send-command-and-check
! vec (format "%s %s" result nonexistent))))
! (and (setq result "/bin/test -e")
! (tramp-send-command-and-check
! vec (format "%s %s" result existing))
! (not (tramp-send-command-and-check
! vec (format "%s %s" result nonexistent))))
! (and (setq result "/usr/bin/test -e")
! (tramp-send-command-and-check
! vec (format "%s %s" result existing))
! (not (tramp-send-command-and-check
! vec (format "%s %s" result nonexistent))))
! (and (setq result (format "%s -d" (tramp-get-ls-command vec)))
! (tramp-send-command-and-check
! vec (format "%s %s" result existing))
! (not (tramp-send-command-and-check
! vec (format "%s %s" result nonexistent)))))
(tramp-error
vec 'file-error "Couldn't find command to check if file exists"))
result))
--- 3559,3588 ----
;; `/usr/bin/test'.
;; `/usr/bin/test -e' In case `/bin/test' does not exist.
(unless (or
! (ignore-errors
! (and (setq result (format "%s -e" (tramp-get-test-command vec)))
! (tramp-send-command-and-check
! vec (format "%s %s" result existing))
! (not (tramp-send-command-and-check
! vec (format "%s %s" result nonexistent)))))
! (ignore-errors
! (and (setq result "/bin/test -e")
! (tramp-send-command-and-check
! vec (format "%s %s" result existing))
! (not (tramp-send-command-and-check
! vec (format "%s %s" result nonexistent)))))
! (ignore-errors
! (and (setq result "/usr/bin/test -e")
! (tramp-send-command-and-check
! vec (format "%s %s" result existing))
! (not (tramp-send-command-and-check
! vec (format "%s %s" result nonexistent)))))
! (ignore-errors
! (and (setq result (format "%s -d" (tramp-get-ls-command vec)))
! (tramp-send-command-and-check
! vec (format "%s %s" result existing))
! (not (tramp-send-command-and-check
! vec (format "%s %s" result nonexistent))))))
(tramp-error
vec 'file-error "Couldn't find command to check if file exists"))
result))
--8<---------------cut here---------------end--------------->8---
> Grüße, Carsten
Best regards, Michael.
This bug report was last modified 13 years and 6 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.