all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: merlyn@stonehenge.com (Randal L. Schwartz)
Cc: emacs-devel@gnu.org
Subject: Re: Tramp Mode not working connecting to OpenSolaris
Date: Fri, 12 Mar 2010 06:38:20 +0100	[thread overview]
Message-ID: <87eijqgkvn.fsf@gmx.de> (raw)
In-Reply-To: <86zl2ed06j.fsf@blue.stonehenge.com> (Randal L. Schwartz's message of "Thu, 11 Mar 2010 13:21:24 -0800")

[-- Attachment #1: Type: text/plain, Size: 523 bytes --]

merlyn@stonehenge.com (Randal L. Schwartz) writes:

> Michael> I need traces, as usual :-)
>
> http://www.stonehenge.com/TRAMP-DEBUG-LOG6

Thanks. There was indeed another error, not related to OpenSolaris, but
you have trapped it as the first one.

Appended is an updated patch, which shall fix your problems. When
confirmed by you, I will submit it to the emacs-23 branch.

Chong: is this OK? It is not a regression wrt Emacs 23.1. For Emacs 22.3
I don't know; Tramp 2.0 and 2.1 differ too much.

Best regards, Michael.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 4050 bytes --]

*** /tmp/ediff2198r4N	2010-03-12 06:32:58.165822018 +0100
--- /home/albinus/src/emacs/lisp/net/tramp.el	2010-03-12 06:29:07.744569594 +0100
***************
*** 6294,6300 ****
  Returns the absolute file name of PROGNAME, if found, and nil otherwise.
  
  This function expects to be in the right *tramp* buffer."
!   (with-current-buffer (tramp-get-buffer vec)
      (let (result)
        ;; Check whether the executable is in $PATH. "which(1)" does not
        ;; report always a correct error code; therefore we check the
--- 6294,6300 ----
  Returns the absolute file name of PROGNAME, if found, and nil otherwise.
  
  This function expects to be in the right *tramp* buffer."
!   (with-current-buffer (tramp-get-connection-buffer vec)
      (let (result)
        ;; Check whether the executable is in $PATH. "which(1)" does not
        ;; report always a correct error code; therefore we check the
***************
*** 6302,6308 ****
        (unless ignore-path
  	(tramp-send-command vec (format "which \\%s | wc -w" progname))
  	(goto-char (point-min))
! 	(if (looking-at "^1$")
  	    (setq result (concat "\\" progname))))
        (unless result
  	(when ignore-tilde
--- 6302,6308 ----
        (unless ignore-path
  	(tramp-send-command vec (format "which \\%s | wc -w" progname))
  	(goto-char (point-min))
! 	(if (looking-at "^\\s-*1$")
  	    (setq result (concat "\\" progname))))
        (unless result
  	(when ignore-tilde
***************
*** 6403,6414 ****
        (with-current-buffer (tramp-get-buffer vec)
  	(tramp-send-command vec "echo ~root" t)
  	(cond
! 	 ((string-match "^~root$" (buffer-string))
  	  (setq shell
  		(or (tramp-find-executable
! 		     vec "bash" (tramp-get-remote-path vec) t)
  		    (tramp-find-executable
! 		     vec "ksh" (tramp-get-remote-path vec) t)))
  	  (unless shell
  	    (tramp-error
  	     vec 'file-error
--- 6403,6417 ----
        (with-current-buffer (tramp-get-buffer vec)
  	(tramp-send-command vec "echo ~root" t)
  	(cond
! 	 ((or (string-match "^~root$" (buffer-string))
! 	      ;; The default shell (ksh93) of OpenSolaris is buggy.
! 	      (string-equal (tramp-get-connection-property vec "uname" "")
! 			    "SunOS 5.11"))
  	  (setq shell
  		(or (tramp-find-executable
! 		     vec "bash" (tramp-get-remote-path vec) t t)
  		    (tramp-find-executable
! 		     vec "ksh" (tramp-get-remote-path vec) t t)))
  	  (unless shell
  	    (tramp-error
  	     vec 'file-error
***************
*** 6837,6845 ****
    ;; "test foo; echo $?" to check if various conditions hold, and
    ;; there are buggy /bin/sh implementations which don't execute the
    ;; "echo $?"  part if the "test" part has an error.  In particular,
!   ;; the Solaris /bin/sh is a problem.  I'm betting that all systems
!   ;; with buggy /bin/sh implementations will have a working bash or
!   ;; ksh.  Whee...
    (tramp-find-shell vec)
  
    ;; Disable unexpected output.
--- 6840,6850 ----
    ;; "test foo; echo $?" to check if various conditions hold, and
    ;; there are buggy /bin/sh implementations which don't execute the
    ;; "echo $?"  part if the "test" part has an error.  In particular,
!   ;; the OpenSolaris /bin/sh is a problem.  There are also other
!   ;; problems with /bin/sh of OpenSolaris, like redirection of stderr
!   ;; in in function declarations, or changing HISTFILE in place.
!   ;; Therefore, OpenSolaris' /bin/sh is replaced by bash, when
!   ;; detected.
    (tramp-find-shell vec)
  
    ;; Disable unexpected output.
***************
*** 6848,6859 ****
    ;; Set the environment.
    (tramp-message vec 5 "Setting default environment")
  
-   ;; On OpenSolaris, there is a bug when HISTFILE is changed in place
-   ;; <http://bugs.opensolaris.org/view_bug.do?bug_id=6834184>.  We
-   ;; apply the workaround.
-   (if (string-equal (tramp-get-connection-property vec "uname" "") "SunOS 5.11")
-       (tramp-send-command vec "unset HISTFILE" t))
- 
    (let ((env (copy-sequence tramp-remote-process-environment))
  	unset item)
      (while env
--- 6853,6858 ----

  reply	other threads:[~2010-03-12  5:38 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-05 22:15 tramp mode not working on OSX with dev HEAD Randal L. Schwartz
2010-03-06  8:03 ` Michael Albinus
2010-03-07 22:39   ` Randal L. Schwartz
2010-03-08  8:00     ` Michael Albinus
2010-03-08 15:24       ` Randal L. Schwartz
2010-03-08 16:58         ` Michael Albinus
2010-03-08 17:03           ` Randal L. Schwartz
2010-03-08 17:19             ` Michael Albinus
2010-03-08 17:40               ` Tramp Mode not working connecting to OpenSolaris (was Re: tramp mode not working on OSX with dev HEAD) Randal L. Schwartz
2010-03-08 17:48                 ` Tramp Mode not working connecting to OpenSolaris Randal L. Schwartz
2010-03-08 18:11                   ` David Kastrup
2010-03-08 21:38                     ` Michael Albinus
2010-03-08 21:35                 ` Michael Albinus
2010-03-08 21:43                   ` Randal L. Schwartz
2010-03-09  6:34                     ` Michael Albinus
2010-03-09 15:49                       ` Randal L. Schwartz
2010-03-09 15:51                       ` Randal L. Schwartz
2010-03-10 17:04                         ` Michael Albinus
2010-03-10 17:08                           ` Randal L. Schwartz
2010-03-10 20:20                             ` Michael Albinus
2010-03-11 16:53                               ` Randal L. Schwartz
2010-03-11 17:53                                 ` Davis Herring
2010-03-11 17:58                                   ` Randal L. Schwartz
2010-03-11 19:37                                     ` Michael Albinus
2010-03-11 19:49                                       ` Randal L. Schwartz
2010-03-11 20:11                                         ` Michael Albinus
2010-03-11 21:21                                           ` Randal L. Schwartz
2010-03-12  5:38                                             ` Michael Albinus [this message]
2010-03-12 16:24                                               ` Chong Yidong
2010-03-13 19:34                                                 ` Michael Albinus
2010-03-13 19:56                                                   ` Stefan Monnier
2010-03-14 18:35                                               ` Randal L. Schwartz
2010-03-14 18:51                                                 ` Michael Albinus
2010-03-15  0:03                                                   ` Randal L. Schwartz
2010-03-09 21:26           ` tramp mode not working on OSX with dev HEAD Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eijqgkvn.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=merlyn@stonehenge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.