Opened 9 years ago

Closed 6 years ago

#2752 closed enhancement (wontfix)

t.remove: add dual-step removal as in g.remove

Reported by: neteler Owned by: grass-dev@…
Priority: normal Milestone: 7.4.1
Component: Temporal Version: svn-trunk
Keywords: t.remove Cc:
CPU: All Platform: All

Description

At time t.remove removes data without warning and force flag.

There are two disadvantages:

  • the user being familiar with g.remove's behaviour will be surprised
  • there is no chance to catch the lack of using -rf (of course a user error), leading to the situation:
GRASS 7.1.svn (eu_laea):~ > t.remove lst_aggreg_modis_week@modis_lst_reconstructed_europe_daily
Note: registered maps themselves have not been removed, only the strds

... user's thought in this moment: "Heck, now the strds is gone but I forgot to specify -rf to also get rid of the related raster maps and no easy way to do that now... nor how to figure out their map names!"

I refer to situations where thousands of maps are stored in a mapset with similar names which is common in time series processing.

Solution:

At time it is a bit confusing since -f would be the best flag name (as it is used in g.remove). I don't think that it would be a problem to even redefine the meaning of -f in G7 since t.remove is still rather new. Hence:

  • change meaning of -f to "force removal" (without -f only show what would be done, yet don't remove). Advertise also -rf in the message.
  • -d Remove all registered maps from the temporal and also from the spatial database (required for actual deletion of files)

Attachments (1)

tremove.diff (1.2 KB ) - added by lucadelu 8 years ago.

Download all attachments as: .zip

Change History (18)

comment:1 by neteler, 8 years ago

Milestone: 7.0.27.0.3

Ticket retargeted after milestone closed

comment:2 by neteler, 8 years ago

Milestone: 7.0.3

Ticket retargeted after milestone closed

comment:3 by neteler, 8 years ago

Milestone: 7.0.4

Ticket retargeted after 7.0.3 milestone closed

comment:4 by lucadelu, 8 years ago

Hi, please test this diff to see if it is following the requested behaviour.

Other changes are requested in the testsuite of several t.* modules

by lucadelu, 8 years ago

Attachment: tremove.diff added

comment:5 by neteler, 8 years ago

The question is how to deal with the flag character to be used...

in reply to:  5 comment:6 by lucadelu, 8 years ago

Replying to neteler:

The question is how to deal with the flag character to be used...

Maybe I could apply this changes in trunk and not backport after we could release these in the next stable major release

comment:7 by martinl, 8 years ago

Milestone: 7.0.47.0.5

comment:8 by martinl, 8 years ago

Ping.

comment:9 by martinl, 8 years ago

Milestone: 7.0.57.3.0

comment:10 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

comment:11 by neteler, 8 years ago

Why not have it in 7.2?

comment:12 by neteler, 6 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:13 by martinl, 6 years ago

What is status of this issue?

in reply to:  13 ; comment:14 by veroandreo, 6 years ago

Replying to martinl:

What is status of this issue?

The behavior described in the ticket is still the current behavior:

  • no flag set: removes the strds directly (no warning) -->> I think it would make sense to have a WARNING as in G7:g.remove and a flag to force the removal of strds only
  • if only -r flag is set, the user gets: ERROR: The recursive flag works only in conjunction with the force flag: use -rf -->> IMHO, it would be consistent with G7:g.remove to get the list of maps that will be removed plus a WARNING with advice to use both flags (-rf) to actually remove strds and maps, otherwise what is the point of having a flag (-r) that cannot be used alone?

in reply to:  14 ; comment:15 by lucadelu, 6 years ago

Replying to veroandreo:

Replying to martinl:

What is status of this issue?

The behavior described in the ticket is still the current behavior:

  • no flag set: removes the strds directly (no warning) -->> I think it would make sense to have a WARNING as in G7:g.remove and a flag to force the removal of strds only
  • if only -r flag is set, the user gets: ERROR: The recursive flag works only in conjunction with the force flag: use -rf -->> IMHO, it would be consistent with G7:g.remove to get the list of maps that will be removed plus a WARNING with advice to use both flags (-rf) to actually remove strds and maps, otherwise what is the point of having a flag (-r) that cannot be used alone?

I think this is a behavior change and it could affect some add-ons since -f should be used like in g.remove so to really remove. I think this should released in next major release. I would like to have this behavior:

  • without flag it show the warning
  • -r to show the maps connected with the temporal dataset
  • -f remove temporal dataset (with -r remove maps from temporal framework)
  • -d to delete maps from mapset

What do you think?

in reply to:  15 comment:16 by veroandreo, 6 years ago

Replying to lucadelu:

I think this is a behavior change and it could affect some add-ons since -f should be used like in g.remove so to really remove. I think this should released in next major release. I would like to have this behavior:

  • without flag it show the warning
  • -r to show the maps connected with the temporal dataset
  • -f remove temporal dataset (with -r remove maps from temporal framework)
  • -d to delete maps from mapset

What do you think?

Sorry for my ignorance here, but is a new flag needed?

I was thinking of:

  • no flag: shows the warning that to remove strds -f should be used
  • only -f: removes the strds, and warns that -rf should be used to remove the maps
  • only -r: shows maps in the strds that will be removed and warns that -r and -f should be used to remove the maps
  • -rf to remove strds and maps (as now)

comment:17 by veroandreo, 6 years ago

Resolution: wontfix
Status: newclosed

Since this would imply a change in the behaviour of the flags that is only possible in major releases, we close this ticket as won't fix. See #3362 for such a request for GRASS 8 :)

Note: See TracTickets for help on using tickets.