[GRASS-dev] Re: [GRASS GIS] #604: /usr/lib/grass64/etc/grass-run.sh
does not
work properly when called by gis.m to execute in a external xterm
GRASS GIS
trac at osgeo.org
Thu May 14 23:29:05 EDT 2009
#604: /usr/lib/grass64/etc/grass-run.sh does not work properly when called by
gis.m to execute in a external xterm
-----------------------+----------------------------------------------------
Reporter: frankie | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: critical | Milestone: 6.4.0
Component: Tcl | Version: 6.4.0 RCs
Resolution: | Keywords: xterm
Platform: Linux | Cpu: Unspecified
-----------------------+----------------------------------------------------
Changes (by hamish):
* priority: minor => critical
Comment:
Ok, found it. It was gis.m/grass-run.sh trying to execute the command in
full (spaces, args, and all) quoted instead of breaking it down into a
$cmd and $args. I added "set" to the grass-run.sh script and the PATHs are
all fine, it is just that there is no ./bin/"g.proj -p" executable. The
give-away was trying "ls -l" and having that fail too.
I've now added in 6.5svn a new feature where if g.gisenv's DEBUG is set
>=1 it will pause before closing the xterm.
it would seem that the problem is on this line of lib/init/grass-run.src:
{{{
# run command
"$@"
}}}
which was introduced, somewhat ironically, in r20416.
The point of r20416 was to allow commands with spaces like:
{{{
# (maybe not the best example, but..)
v.db.select roads where="label ~ 'highway'"
}}}
... to function correctly.
but it looks like it is backfiring.
not sure how to fix it in sh, in Tcl at least we can use a list of
strings. some magic with "shift" perhaps?
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/604#comment:4>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list