On Tue, Jul 20, 2010 at 7:37 AM, Michael Albinus
<address@hidden> wrote:
> yes, that is done. and 'which' is now found, but /tmp/456 is the same
>
> address@hidden:/tmp > cat 456
> syntax error at -e line 3, near ");"
> Execution of -e aborted due to compilation errors.
> address@hidden:/tmp >
Hmm, still strange.
the cvs update no longer writes to that file, so I wont report its contents
I've found an error in the definition of "tramp_perl_file_attributes":
it passes "$3" to the Perl program, although only 2 arguments are given
when "tramp_perl_file_attributes" is called. The other shells seem to
ignore this; maybe it is the problem in your case. I've fixed it in the
repository, could you, please, try?
I did a cvs update and got a conflict in lisp/tramp.el, so I removed it and did cvs update again
If it still doesn't work,
could you, please, check on the remote host
the following commands:
# which \perl
address@hidden:/tmp > which which
/usr/bsd/which
address@hidden:/tmp > which \perl
/bin/perl
address@hidden:/tmp > echo $PATH
/bin:/sbin:/usr/sbin:/usr/bsd:/usr/bin:/u/httpd/bin:/u/bin:/u/bin/sa:/usr/local/bin:/usr/etc:/u/qmail/bin:/usr/local/ibin
# tramp_perl_file_attributes () {
\perl -e '
@stat = lstat($ARGV[0]);
if (address@hidden) {
print "nil\n";
exit 0;
}
if (($stat[2] & 0170000) == 0120000)
{
$type = readlink($ARGV[0]);
$type = "\"$type\"";
}
elsif (($stat[2] & 0170000) == 040000)
{
$type = "t";
}
else
{
$type = "nil"
};
$uid = ($ARGV[1] eq "integer") ? $stat[4] : "\"" . getpwuid($stat[4]) . "\"";
$gid = ($ARGV[1] eq "integer") ? $stat[5] : "\"" . getgrgid($stat[5]) . "\"";
printf(
"(%s %u %s %s (%u %u) (%u %u) (%u %u) %u.0 %u t (%u . %u) -1)\n",
$type,
$stat[3],
$uid,
$gid,
$stat[8] >> 16 & 0xffff,
$stat[8] & 0xffff,
$stat[9] >> 16 & 0xffff,
$stat[9] & 0xffff,
$stat[10] >> 16 & 0xffff,
$stat[10] & 0xffff,
$stat[7],
$stat[2],
$stat[1] >> 16 & 0xffff,
$stat[1] & 0xffff
);' "$1" "$2"
}
address@hidden:/tmp > tramp_perl_file_attributes () {
> \perl -e '
> @stat = lstat($ARGV[0]);
> if (address@hidden) {
if (@stat = lstat($ARGV[0]);) {
> print "nil\n";
> exit 0;
> }
> if (($stat[2] & 0170000) == 0120000)
> {
> $type = readlink($ARGV[0]);
> $type = "\"$type\"";
> }
> elsif (($stat[2] & 0170000) == 040000)
> {
> $type = "t";
> }
> else
> {
> $type = "nil"
> };
> $uid = ($ARGV[1] eq "integer") ? $stat[4] : "\"" . getpwuid($stat[4]) . "\"";
> $gid = ($ARGV[1] eq "integer") ? $stat[5] : "\"" . getgrgid($stat[5]) . "\"";
> printf(
> "(%s %u %s %s (%u %u) (%u %u) (%u %u) %u.0 %u t (%u . %u) -1)\n",
> $type,
> $stat[3],
> $uid,
> $gid,
> $stat[8] >> 16 & 0xffff,
> $stat[8] & 0xffff,
> $stat[9] >> 16 & 0xffff,
> $stat[9] & 0xffff,
> $stat[10] >> 16 & 0xffff,
> $stat[10] & 0xffff,
> $stat[7],
> $stat[2],
> $stat[1] >> 16 & 0xffff,
> $stat[1] & 0xffff
> );' "$1" "$2"
> }
# set -xv
address@hidden:/tmp > set -xv
# tramp_perl_file_attributes /root/ integer
> $uid = ($ARGV[1] eq "integer") ? $stat[4] : "\"" . getpwuid($stat[4]) . "\"";
$uid = ($ARGV[1] eq "integer") ? $stat[4] : "\"" . getpwuid($stat[4]) . "\"";
> $gid = ($ARGV[1] eq "integer") ? $stat[5] : "\"" . getgrgid($stat[5]) . "\"";
$gid = ($ARGV[1] eq "integer") ? $stat[5] : "\"" . getgrgid($stat[5]) . "\"";
> printf(
printf(
> "(%s %u %s %s (%u %u) (%u %u) (%u %u) %u.0 %u t (%u . %u) -1)\n",
"(%s %u %s %s (%u %u) (%u %u) (%u %u) %u.0 %u t (%u . %u) -1)\n",
> $type,
$type,
> $stat[3],
$stat[3],
> $uid,
$uid,
> $gid,
$gid,
> $stat[8] >> 16 & 0xffff,
$stat[8] >> 16 & 0xffff,
> $stat[8] & 0xffff,
$stat[8] & 0xffff,
> $stat[9] >> 16 & 0xffff,
$stat[9] >> 16 & 0xffff,
> $stat[9] & 0xffff,
$stat[9] & 0xffff,
> $stat[10] >> 16 & 0xffff,
$stat[10] >> 16 & 0xffff,
> $stat[10] & 0xffff,
$stat[10] & 0xffff,
> $stat[7],
$stat[7],
> $stat[2],
$stat[2],
> $stat[1] >> 16 & 0xffff,
$stat[1] >> 16 & 0xffff,
> $stat[1] & 0xffff
$stat[1] & 0xffff
> );' "$1" "$2"
);' "$1" "$2"
> }
}
address@hidden:/tmp >