[GRASS-dev] [GRASS GIS] #1981: export error in osgeo4w/grass.tmpl

#1981: export error in osgeo4w/grass.tmpl
-------------------------+--------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Packaging | Version: svn-trunk
Keywords: scripting | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Hi,

unless I'm misreading something the "export" in osgeo4w/grass.tmpl is
called incorrectly. (all branches)

{{{
export $OSGEO4W_ROOT_MSYS $GISBASE $GRASS_SH $GRASS_WISH $GRASS_PYTHON
$PYTHONHOME $GRASS_PROJSHARE
export $PATH
}}}

the $VARIABLES get exanded before the command is called, so the
''contents'' of the $VARIABLES get exported, not the variable names. i.e.
when using "export" or "unset", don't add the "$".

also I suspect that in the lines above the enviro variable settings should
be "quoted". (most will just be C:\osgeo4w so not a big deal, but for
correctness/safety/future these things should be fixed..)

ok to change?

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1981&gt;
GRASS GIS <http://grass.osgeo.org>

#1981: export error in osgeo4w/grass.tmpl
-------------------------+--------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Packaging | Version: svn-trunk
Keywords: scripting | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by glynn):

Replying to [ticket:1981 hamish]:

> ok to change?

Yes. A "$" in an "export" command is almost always wrong.

There '''might''' be a situation where "`export $LD_LIBRARY_PATH_VAR`" is
required, but I think that LD_LIBRARY_PATH_VAR is normally substituted
rather than ending up in the final script.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1981#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1981: export error in osgeo4w/grass.tmpl
-------------------------+--------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Packaging | Version: svn-trunk
Keywords: scripting | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by hamish):

done in trunk and devbr6 with r56458,9.

another one to consider changing, in env.bat:

-set GRASS_PYTHON=python
+set GRASS_PYTHON=%GISBASE%\extrabin\python.exe

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1981#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1981: export error in osgeo4w/grass.tmpl
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 6.4.3
Component: Packaging | Version: svn-trunk
Resolution: fixed | Keywords: scripting
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Changes (by hamish):

  * status: new => closed
  * resolution: => fixed

Comment:

applied in relbr64 in r56631.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1981#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>