[GRASS-dev] [GRASS GIS] #2685: Add ignore lock flag to grass command
GRASS GIS
trac at osgeo.org
Tue Jun 2 07:22:07 PDT 2015
#2685: Add ignore lock flag to grass command
--------------------------+---------------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.1.0
Component: Startup | Version: svn-trunk
Resolution: | Keywords: init, grass.py, CLI
CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------
Comment (by wenzeslaus):
Replying to [comment:1 mlennert]:
> Wouldn't this mean that every module has to check whether there is a
.gislock ?
No. There would be no check. It is up to the caller. Perhaps the note
about read-only shouldn't be in the parameter explanation, just in a
detailed documentation. Read-only is suggestion or use case here, not
something enforced.
> You can always create another mapset and read whatever you need from
there, so I don't understand the need for a read-only access to a
particular mapset.
There is several ways around it. `g.list` can just read from other Mapsets
and `g.mapsets` can give you an (actual) read-only access to other Mapset.
However, the use case here is emulate what you get when you set up GRASS
environment/session manually
("[http://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly
without starting explicitly]"). You have no checks at all and you can
still access and do anything. Purpose of suggested (`-i`) flag is to skip
the lock check but still benefit from other things `grass.py` is doing
like taking care of "gisrc" file.
> Sounds like a dangerous path to me.
`-f` is also dangerous, and on MS Windows or when you set up GRASS
environment/session manually
("[http://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly
without starting explicitly]") there are no checks at all, so I don't
think it is more dangerous than anything we have now. On the contrary,
with `-i` you would explicitly ask for this dangerous behavior which is
safer then getting it unexpectedly (in an implicit way) with manual setup
of the environment or on MS Windows in general.
These things are what I considered but I might have missed something.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2685#comment:2>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list