[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tramp (2.1.18-23.2); Dont work with stat from coreutils-8.6
From: |
Terechkov Evgenii |
Subject: |
tramp (2.1.18-23.2); Dont work with stat from coreutils-8.6 |
Date: |
Sun, 17 Oct 2010 01:27:06 +0800 |
Hi, all.
Seems like I hitted bug in tramp that make it broken on my system since
I upgrade from coreutils-8.5 to coreutils-8.6. Here is problem
description:
1) When I tried to open "/sudo::/etc/net/ifaces" directory, I get
following traceback:
Debugger entered--Lisp error: (wrong-type-argument numberp
1287212125\.000000000\.0)
floor(1287212125\.000000000\.0 65536)
tramp-convert-file-attributes(["sudo" "root" "evg.krastel.ru"
"/etc/net/ifaces/"] (("`/etc/net/ifaces/'") 17 0 0 1287212125\.000000000\.0
1285249174\.000000000\.0 1285249174\.000000000\.0 4096.0 "drwxr-xr-x" t
557742.0 -1))
tramp-handle-file-attributes("/sudo:address@hidden:/etc/net/ifaces/")
...
2) I traced problem down to function tramp-do-file-attributes-with-stat
and noticed that this function adds some ".0" to stat's output. Here is
checks I made with old and new versions of coreutils:
====8<==with coreutils-8.5======================================================
$stat -c '%X %Y' /etc/net/ifaces
1287212125 1285249174
================================================================================
====8<==with coreutils-8.6======================================================
$stat -c '%X %Y' /etc/net/ifaces
1287212125.000000000 1285249174.000000000
================================================================================
3) Here is notes about this change in behavior from NEWS file of
coreutils-8.6:
====8<==NEWS.bz2================================================================
stat now outputs the full sub-second resolution for the atime,
mtime, and ctime values since the Epoch, when using the %X, %Y, and
%Z directives of the --format option. This matches the fact that
%x, %y, and %z were already doing so for the human-readable variant.
================================================================================
4) So I wrote this little patch to tramp.el:
- "((%s %s || %s -h %s) && %s -c '((\"%%N\") %%h %s %s %%X.0 %%Y.0 %%Z.0
%%s.0 \"%%A\" t %%i.0 -1)' %s || echo nil)"
+ "((%s %s || %s -h %s) && %s -c '((\"%%N\") %%h %s %s %%X %%Y %%Z %%s.0
\"%%A\" t %%i.0 -1)' %s || echo nil)"
It works for me, but probably it is not right fix for this case. I hope
somebody of tramp's developers will do it right :-)
Emacs : GNU Emacs 23.2.1 (i586-alt-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2010-05-21 on apiary.orion.altlinux.org
Package: tramp (2.1.18-23.2)
P.S.: sorry for ugly Engligh.
--
WBR, Evgenii
Terechkov.
- tramp (2.1.18-23.2); Dont work with stat from coreutils-8.6,
Terechkov Evgenii <=