[GRASS-dev] Re: [GRASS GIS] #820: r.in.wms doesn't work in WinGRASS installer distribution

GRASS GIS trac at osgeo.org
Thu Aug 26 13:00:05 EDT 2010


#820: r.in.wms doesn't work in WinGRASS installer distribution
---------------------------------------+------------------------------------
 Reporter:  ddalimonte                 |       Owner:  grass-dev@…              
     Type:  defect                     |      Status:  new                      
 Priority:  major                      |   Milestone:  6.4.0                    
Component:  Projections/Datums         |     Version:  svn-releasebranch64      
 Keywords:  r.in.wms, wingrass, cs2cs  |    Platform:  MSWindows XP             
      Cpu:  Unspecified                |  
---------------------------------------+------------------------------------

Comment(by glynn):

 Replying to [comment:29 hamish]:
 > Replying to [comment:26 hamish]:
 > > > for the trac record, the shell scripts needed the programs called
 > > > with their full path in the command line,
 >
 > Replying to [comment:27 mmetz]:
 > > Not in my self-compiled 6.4 version, no changes to the local copy. My
 > > point was that calling the programs in question with their full path
 > > might be fighting symptoms and not the cause.
 >
 > I think it happens on the second pass, when g.parser relaunches $0. (??)
 >
 > perhaps it works or doesn't work because Windows includes pwd in the
 path while UNIX does not? So if you happen to be in the same dir as the
 addon script on Windows it will magically work, while on UNIX (or if you
 cd..), it would not?

 On Unix, g.parser re-invokes the script using execl(), which doesn't use
 the path. There isn't any point in using the path; g.parser must be able
 to open the script to read the option specifications, so it must have
 either the full path to the script or a path relative to the current
 directory.

 When the shell executes a script via the path, the program specified in
 the #! line (e.g. bash) will receive the script's full path in argv![1].
 In the case of bash, this path is available via $0.

 On Windows, g.parser re-invokes a script by executing $GRASS_SH with the
 path to the script as the first argument. Again, this requires either a
 full path or a path relative to the current directory; %PATH% has no
 effect.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/820#comment:30>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list