]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp-sh.el (tramp-set-remote-path, tramp-get-ls-command):
authorMichael Albinus <michael.albinus@gmx.de>
Thu, 7 Nov 2013 11:13:41 +0000 (12:13 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Thu, 7 Nov 2013 11:13:41 +0000 (12:13 +0100)
Instrument, in order to hunt failure on hydra.

lisp/ChangeLog
lisp/net/tramp-sh.el

index d80d0389676cae1165be67484eb81880281265c4..e8bebb17c4f6433c462e86c62c17add6555cdf10 100644 (file)
@@ -1,3 +1,8 @@
+2013-11-07  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-sh.el (tramp-set-remote-path, tramp-get-ls-command):
+       Instrument, in order to hunt failure on hydra.
+
 2013-11-05  Nathan Trapuzzano  <nbtrap@nbtrap.com>  (tiny change)
 
        * emacs-lisp/cl-macs.el (cl-symbol-macrolet): Print warning for
index f8b99dd918eae73a33ca6e5a7710bf0661240401..77965b67c71c8bb514c90fc4d6cd02e8f3f8de66 100644 (file)
@@ -3576,6 +3576,12 @@ This function expects to be in the right *tramp* buffer."
 I.e., for each directory in `tramp-remote-path', it is tested
 whether it exists and if so, it is added to the environment
 variable PATH."
+  (when (featurep 'ert)
+    (ignore-errors
+      (with-demoted-errors
+         (message
+          "tramp-set-remote-path:\n%s\n"
+          (tramp-send-command-and-read vec "echo PATH=$PATH")))))
   (tramp-message vec 5 "Setting $PATH environment variable")
   (tramp-send-command
    vec (format "PATH=%s; export PATH"
@@ -4831,7 +4837,23 @@ Return ATTR."
        remote-path)))))
 
 (defun tramp-get-ls-command (vec)
-  (with-tramp-connection-property vec "ls"
+;  (with-tramp-connection-property vec "ls"
+    (when (featurep 'ert)
+      (ignore-errors
+       (with-demoted-errors
+         (message
+          "tramp-get-ls-command printenv:\n%s\n"
+          (tramp-send-command-and-read
+           vec "echo \"\\\"`(printenv | sort) || exit`\\\"\"")))
+       (with-demoted-errors
+         (message
+          "tramp-get-ls-command getconf PATH:\n%s\n"
+          (tramp-send-command-and-read
+           vec "echo \\\"`getconf PATH 2>/dev/null || exit`\\\"")))
+       (with-demoted-errors
+         (message
+          "tramp-get-ls-command whereis ls:\n%s\n"
+          (tramp-send-command-and-read vec "echo \"\\\"`whereis ls || exit`\\\"\"")))))
     (tramp-message vec 5 "Finding a suitable `ls' command")
     (or
      (catch 'ls-found
@@ -4853,7 +4875,7 @@ Return ATTR."
                 (setq result (concat result " --color=never")))
               (throw 'ls-found result))
             (setq dl (cdr dl))))))
-     (tramp-error vec 'file-error "Couldn't find a proper `ls' command"))))
+     (tramp-error vec 'file-error "Couldn't find a proper `ls' command")));)
 
 (defun tramp-get-ls-command-with-dired (vec)
   (save-match-data