From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#12148: 24.1.50; Tramp has problems with Solaris server (test -e) Date: Wed, 08 Aug 2012 08:47:38 +0200 Message-ID: <87lihpop6d.fsf@gmx.de> References: <2318D1E1-B7AD-4160-A10F-04666C5385C2@tzi.org> <87ehnjaxvb.fsf@gmx.de> <5334FB1F-2455-4513-9B42-4DB7175FD71E@tzi.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1344408487 7313 80.91.229.3 (8 Aug 2012 06:48:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Aug 2012 06:48:07 +0000 (UTC) Cc: 12148@debbugs.gnu.org To: Carsten Bormann Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 08 08:48:07 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sz03p-0001TY-Db for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Aug 2012 08:48:05 +0200 Original-Received: from localhost ([::1]:47152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sz03o-000823-FF for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Aug 2012 02:48:04 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sz03l-00081b-J8 for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 02:48:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sz03k-0008PA-Ca for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 02:48:01 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sz03k-0008P4-8X for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 02:48:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Sz0BV-0003YX-Vc for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 02:56:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <2318D1E1-B7AD-4160-A10F-04666C5385C2@tzi.org> Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Aug 2012 06:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12148 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12148-submit@debbugs.gnu.org id=B12148.134440895313652 (code B ref 12148); Wed, 08 Aug 2012 06:56:01 +0000 Original-Received: (at 12148) by debbugs.gnu.org; 8 Aug 2012 06:55:53 +0000 Original-Received: from localhost ([127.0.0.1]:40953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sz0BM-0003Y8-9o for submit@debbugs.gnu.org; Wed, 08 Aug 2012 02:55:53 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:55183) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1Sz0BJ-0003Y0-8L for 12148@debbugs.gnu.org; Wed, 08 Aug 2012 02:55:50 -0400 Original-Received: (qmail invoked by alias); 08 Aug 2012 06:47:43 -0000 Original-Received: from p57BB95AA.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.149.170] by mail.gmx.net (mp071) with SMTP; 08 Aug 2012 08:47:43 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX19mEO1Z+ldmdGwtYJA0mWnCyx9a5w0GEUOy55Q3VR qfMTFGXVdk8svg User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62932 Archived-At: Carsten Bormann 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 ve= c))) ! (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=C3=BC=C3=9Fe, Carsten Best regards, Michael.