[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tramp (2.1.11-pre); upgrade to gutsy and cannot open files on one se
Re: tramp (2.1.11-pre); upgrade to gutsy and cannot open files on one server
Fri, 26 Oct 2007 20:18:10 -0400
Thunderbird 126.96.36.199 (X11/20071022)
I downloaded CVS tramp and played with it. It still didn't work off the
bat, but I figured it out. The localhost in the filename is causing
tramp to try and "cheat" and copy the file with "cp -f" when it should
be sending it in-band.
The attached patch fixes the problem, by making tramp-local-host-p
return nil when there is a port specified. So ssh:localhost:blah will
return t but ssh:localhost#3001:blah will return nil.
Admittedly this is not definitive, but then again, given the possibility
of port forwarding, neither was the original.
The only other solution I can think of is to introduce a configuration
variable to govern the local-optimized behaviors, which would be another
way to prevent the "cp -f" when it was not helpful.
You may be able to come up with a better way to actually fix the issue.
Michael Albinus wrote:
Martin Flack <address@hidden> writes:
I'm attaching a backtrace. Let me know if that's all you need.
Yep, that's sufficient.
Locally, my temporary folder is /home/martin/tmp. On the server I'm
having problems with, it's /tmp (or more likely not set).
I unset $TMP, $TEMP, and $TMPDIR locally and tried again - this time it
seems to do the copy ok, but stops on chown. The problem is that 1000 is
my UID locally, but it's 503 remotely, so 1000 fails as one would
There have been some changes with temporary directory handling
recently. I *believe* Tramp 2.1.11, released 2 weeks ago, shall be
sufficient in your case (you're using a prerelease), but I'm still
polishing this part. My final changes will be committed tomorrow or
Thanks for testing, and best regards, Michael.
--- lisp/tramp.el.~2.600.~ 2007-10-23 17:50:55.000000000 -0400
+++ lisp/tramp.el 2007-10-26 19:51:26.000000000 -0400
@@ -6678,8 +6678,10 @@
(defun tramp-local-host-p (vec)
"Return t if this points to the local host, nil otherwise."
- (let ((host (tramp-file-name-real-host vec)))
+ (let ((host (tramp-file-name-real-host vec))
+ (port (tramp-file-name-port v)))
+ (null port)
(concat "^" (regexp-opt (list "localhost" (system-name)) t) "$") host))))