#1074: $GRASS_BATCH_JOB isn't executed
---------------------+------------------------------------------------------
Reporter: martin | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: default | Version: svn-trunk
Keywords: | Platform: Linux
Cpu: x86-64 |
---------------------+------------------------------------------------------
GRASS SVN trunk is installed into /opt/GRASS70/ (analogously to the one in #491). I've copied a rudimentary $GISDBASE and ~/.grass7/rc from another
machine which is capable of running a GUI. GRASS_GUI is set to text in the
rc file.
{{{
hypersphere: 10:15:36 ~> pwd
/home/martin
hypersphere: 10:15:37 ~> ls -l landcover/grassimport_pg.sh
-rwxr-xr-x 1 martin users 6590 19. Mai 09:51 landcover/grassimport_pg.sh
hypersphere: 10:15:40 ~> head -1 landcover/grassimport_pg.sh
v.in.ogr dsn="PG:host=zuluviz.optiputer.net dbname=landcover user=webuser"
layer=cstest_agroforest output=cstest_agroforest
}}}
Ok, now:
{{{
hypersphere: 10:15:44 ~> env
LOCATION=/home/martin/grassdata/world/PERMANENT
GRASS_BATCH_JOB=/home/martin/landcover/grassimport_pg.sh
/opt/GRASS70/bin/grass70
Cleaning up temporary files...
Starting GRASS GIS...
Executing '/home/martin/landcover/grassimport_pg.sh' ...
Welcome to GRASS 7.0.svn (2010)
[... nothing happens ...]
hypersphere /home/martin> exit
exit
Cleaning up temporary files...
Batch job '/home/martin/landcover/grassimport_pg.sh' (defined in
GRASS_BATCH_JOB variable) was executed.
Goodbye from GRASS GIS
}}}
Actually almost everything is fine - just the $GRASS_BATCH_JOB script
doesn't get executed as promised. When copying script lines into the GRASS
command prompt, they're being processed nicely.
Same batch setup worked perfectly with GRASS64 and I didn't encounter any
differences in the HTML manual pages, therefore I decided to file a bug.
#1074: $GRASS_BATCH_JOB isn't executed
---------------------+------------------------------------------------------
Reporter: martin | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Python | Version: svn-trunk
Resolution: | Keywords: startup
Platform: Linux | Cpu: x86-64
---------------------+------------------------------------------------------
Changes (by hamish):
* keywords: => startup
Comment:
One thing I've wanted to see for a long time, and grass7 init.py is a
great opportunity for, is to have better parsing of command line options
than grass 6's init.sh has. Maybe I'm just used to how good G_parser() is
by comparison..
Anyway, it would be great to be able to pass the batch job script filename
as a command line option to init.py instead of having to mess with special
environment variable hacks etc. to get it to work.
thanks,
Hamish
ps- any objections/comments to adding a "startup" component in trac?
#1074: $GRASS_BATCH_JOB isn't executed
----------------------+-----------------------------------------------------
Reporter: martin | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Startup | Version: svn-trunk
Resolution: | Keywords: startup
Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Comment (by alf):
Replying to [comment:7 martinl]:
> Replying to [comment:6 alf]:
> > using the patch below, the file specified in GRASS_BATCH_JOB variable
is executed as expected.
>
> thanks, slightly modified patch applied in r42535. Martin
Good!
find another patch with the Popen wait method, that waits for the batch
job to be finished before going on.