On Nov 12, 2004, at 8:17 AM, Peter Elmer wrote:
>   Did fixing this have any effect on the problem you reported earlier
> with the cache file system? (i.e. that the staged file winds up in the
> index area instead of the cache filesystems themselves).

Not by itself. It was the first piece of the puzzle. I did it to work 
late last night.

The problem is that SLAC uses ooss_Stage, not the thing it distributes 
to everyone else. (The file is the same, but the behavior is changed by 
changing the name to mps_Stage.)

To make it work I had to do the following:

1. Modify mps_Stage so that it never calls the subroutine Xfr_File. The 
manual promises that xfrcmd is always called as xfrcmd -f scriptfn 
xfrhost xfrport. The subroutine Xfr_File calls it with no arguments.  
By commenting out the setting of XfrCmd from the config file, I 
prevented Xfr_File from being called.

2. I had to put in an mps.scan directive (Dan Riley was right). That 
was the only way to get $Dolink set to 1 in mps_Stage. That's the only 
way to get $DoLink set to 1. (It happens in sub InPlace().)

I also noticed that the fix I made to the config parsing is still not 
quite good enough. Stripping the white space off $val has to happen 
before the splits, since we are splitting on white space. So it 
probably should be:

while( <CONFIG> ) {
    s/#.*$//;       #remove comments
    s/^\s*//;       #remove leading whitespaces
    ($var, $val) = split(/\s/,$_,2);
    $val = (split(/\s/,$val,2))[1] if $val =~ /^=/; # remove =
    $var =~ tr/ \t\n//d;   #remove whitespaces
    $val =~ s/\s*$//;      #remove trailing whitespaces

Somebody should think that through a little more, since it may have 
other implications.

Gregory J. Sharp                   email: [log in to unmask]
Wilson Synchrotron Laboratory      url:
Dryden Rd                          ph:  +1 607 255 4882
Ithaca, NY 14853                   fax: +1 607 255 8062