[GRASS-dev] [GRASS GIS] #2678: GRASS starts even when Mapset is locked

#2678: GRASS starts even when Mapset is locked
-------------------------------------------------+-------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.1
Component: Startup | Version: svn-trunk
Keywords: init, grass.py, lock, locking, | CPU: Unspecified
  .gislock, GUI |
Platform: Linux |
-------------------------------------------------+-------------------------
When GUI is requested and location provided, GRASS starts even when
location is locked.

Start GRASS in one terminal:
{{{
grass71 [.../grassdata/nc_spm_08_grass7/user1]
}}}

Start GRASS in another terminal, specify (the same) mapset in command line
and ensure you start GUI:
{{{
grass71 .../grassdata/nc_spm_08_grass7/user1 -gui
}}}

This behavior is already present in r65235
(source:grass/trunk/lib/init/grass.py?rev=65235#L884).

For 7.0 branch it might be enough to just call exit after showing the
error message in GUI. However, for trunk, there are some related
refactoring and interface changes which would be good to do.

What needs to be changes is here:
  * trunk source:grass/trunk/lib/init/grass.py#L1128
  * 70 branch:
source:grass/branches/releasebranch_7_0//lib/init/grass.py#L882

Note that for debugging the `grass.py` you can use `GRASS_DEBUG` variable
set to something.

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