From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: Tramp Mode not working connecting to OpenSolaris Date: Fri, 12 Mar 2010 06:38:20 +0100 Message-ID: <87eijqgkvn.fsf@gmx.de> References: <86r5ny1kl6.fsf@blue.stonehenge.com> <87d3zfgs4q.fsf@gmx.de> <86lje2suor.fsf@blue.stonehenge.com> <876356wy1m.fsf@gmx.de> <861vfusq3f.fsf@blue.stonehenge.com> <871vfuwx1g.fsf@gmx.de> <86tysqr9sq.fsf_-_@blue.stonehenge.com> <87tysq1oq6.fsf@gmx.de> <86d3zeo5eu.fsf@blue.stonehenge.com> <87lje20zry.fsf@gmx.de> <86mxyhjxxe.fsf@blue.stonehenge.com> <87fx489kg8.fsf@gmx.de> <864okodryx.fsf@blue.stonehenge.com> <87y6i0ornu.fsf@gmx.de> <86aaueg5pw.fsf@blue.stonehenge.com> <40671.130.55.118.19.1268329989.squirrel@webmail.lanl.gov> <86pr3aeo4u.fsf@blue.stonehenge.com> <87ociuhcod.fsf@gmx.de> <868w9yej0i.fsf@blue.stonehenge.com> <87k4tihb4o.fsf@gmx.de> <86zl2ed06j.fsf@blue.stonehenge.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1268372319 26863 80.91.229.12 (12 Mar 2010 05:38:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 12 Mar 2010 05:38:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: merlyn@stonehenge.com (Randal L. Schwartz) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 12 06:38:34 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NpxZy-0002GS-4v for ged-emacs-devel@m.gmane.org; Fri, 12 Mar 2010 06:38:34 +0100 Original-Received: from localhost ([127.0.0.1]:44760 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NpxZx-0006hV-Jt for ged-emacs-devel@m.gmane.org; Fri, 12 Mar 2010 00:38:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NpxZs-0006h3-9z for emacs-devel@gnu.org; Fri, 12 Mar 2010 00:38:28 -0500 Original-Received: from [140.186.70.92] (port=33353 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NpxZq-0006gq-8T for emacs-devel@gnu.org; Fri, 12 Mar 2010 00:38:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NpxZo-0000sg-NB for emacs-devel@gnu.org; Fri, 12 Mar 2010 00:38:26 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]:38091) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1NpxZo-0000sM-7g for emacs-devel@gnu.org; Fri, 12 Mar 2010 00:38:24 -0500 Original-Received: (qmail invoked by alias); 12 Mar 2010 05:38:22 -0000 Original-Received: from p4FC00CB3.dip0.t-ipconnect.de (EHLO detlef.local) [79.192.12.179] by mail.gmx.net (mp008) with SMTP; 12 Mar 2010 06:38:22 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX18Js0kzBdYJP1nNrxaAd0Bb548qWUd8JLS6BUp9B1 tZcfvNyX9SFfAG In-Reply-To: <86zl2ed06j.fsf@blue.stonehenge.com> (Randal L. Schwartz's message of "Thu, 11 Mar 2010 13:21:24 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.93 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.59999999999999998 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:121847 Archived-At: --=-=-= 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. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment *** /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 - ;; . 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 ---- --=-=-=--