[GRASS-dev] [GRASS GIS] #3000: i.gensig overwrites signature file without warning

#3000: i.gensig overwrites signature file without warning
-------------------------+-------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Imagery | Version: svn-trunk
Keywords: i.gensig | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
Although it is not a huge issue, overwriting output files without asking
for confirmation goes against the spirit of GRASS GIS.

An --overwrite flag should be implemented for i.gensig for signature file.

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

#3000: i.gensig overwrites signature file without warning
--------------------------+-------------------------
  Reporter: marisn | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Imagery | Version: svn-trunk
Resolution: | Keywords: i.gensig
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by mmetz):

Replying to [ticket:3000 marisn]:
> Although it is not a huge issue, overwriting output files without asking
for confirmation goes against the spirit of GRASS GIS.
>
> An --overwrite flag should be implemented for i.gensig for signature
file.

Please try r68415 (changes in lib/imagery).

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

#3000: i.gensig overwrites signature file without warning
--------------------------+-------------------------
  Reporter: marisn | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.2.0
Component: Imagery | Version: svn-trunk
Resolution: fixed | Keywords: i.gensig
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------
Changes (by marisn):

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

Comment:

In [changeset:"68434" 68434]:
{{{
#!CommitTicketReference repository="" revision="68434"
Imagery modules: Ask to overwrite signature files. Fixes #3000
}}}

--
Ticket URL: </ticket/3000#comment:3>
GRASS GIS <https://grass.osgeo.org>

#3000: i.gensig overwrites signature file without warning
--------------------------+-------------------------
  Reporter: marisn | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.2.0
Component: Imagery | Version: svn-trunk
Resolution: fixed | Keywords: i.gensig
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by marisn):

Sorry, that change is wrong as it will check for file presence only if
OVERWRITE is set and fail to do so if it is unset (usual case). I reverted
it in r68432

I implemented a new function to find signature files in r68433 to not
change I_find_subgroup_file function within 7.x lifetime. Good question if
all hardcoded directory separators in lib/imagery should not be replaced
with HOST_DIRSEP as it is done in r68433 to match how G_file_name works.
Needs testing on Windows.

As of r68434 all (I hope) signatures generating modules perform check to
not overwrite signature file.

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