On Tue, Jul 20, 2010 at 7:37 AM, Michael Albinus <[email protected]>wrote:

> Terrence Brannon <[email protected]> writes:
>
> > yes, that is done. and 'which' is now found, but /tmp/456 is the same
> >
> > r...@aim:/tmp > cat 456
> > syntax error at -e line 3, near ");"
> > Execution of -e aborted due to compilation errors.
> > r...@aim:/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,


it didnt. here is the gist - http://gist.github.com/482906


> could you, please, check on the remote host
> the following commands:
>
> # which \perl
>

r...@aim:/tmp > which which
/usr/bsd/which
r...@aim:/tmp > which \perl
/bin/perl
r...@aim:/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 (!...@stat) {
>    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"
> }
>

r...@aim:/tmp > tramp_perl_file_attributes () {
> \perl -e '
> @stat = lstat($ARGV[0]);
> if (!...@stat) {
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
>

r...@aim:/tmp > set -xv



>
> # tramp_perl_file_attributes /root/ integer
>

r...@aim:/tmp > tramp_perl_file_attributes () {
tramp_perl_file_attributes () {
> \perl -e '
\perl -e '
> @stat = lstat($ARGV[0]);
@stat = lstat($ARGV[0]);
> if (!...@stat) {
if (@stat = lstat($ARGV[0]);) {
if (@stat = lstat($ARGV[0]);) {
>    print "nil\n";
   print "nil\n";
>    exit 0;
   exit 0;
> }
}
> if (($stat[2] & 0170000) == 0120000)
if (($stat[2] & 0170000) == 0120000)
> {
{
>    $type = readlink($ARGV[0]);
   $type = readlink($ARGV[0]);
>    $type = "\"$type\"";
   $type = "\"$type\"";
> }
}
> elsif (($stat[2] & 0170000) == 040000)
elsif (($stat[2] & 0170000) == 040000)
> {
{
>    $type = "t";
   $type = "t";
> }
}
> else
else
> {
{
>    $type = "nil"
   $type = "nil"
> };
};
> $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"
> }
}
r...@aim:/tmp >


-- 
Search! Search! [DuckDuckGo](http://duckduckgo.com/?t=terrencebrannon)
_______________________________________________
Tramp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to