Opened 9 years ago
Closed 7 years ago
#2752 closed enhancement (wontfix)
t.remove: add dual-step removal as in g.remove
Reported by: | neteler | Owned by: | |
---|---|---|---|
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)
Change History (18)
comment:1 by , 9 years ago
Milestone: | 7.0.2 → 7.0.3 |
---|
comment:4 by , 9 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 , 9 years ago
Attachment: | tremove.diff added |
---|
follow-up: 6 comment:5 by , 9 years ago
The question is how to deal with the flag character to be used...
comment:6 by , 9 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 , 9 years ago
Milestone: | 7.0.4 → 7.0.5 |
---|
comment:9 by , 8 years ago
Milestone: | 7.0.5 → 7.3.0 |
---|
follow-up: 15 comment:14 by , 7 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?
follow-up: 16 comment:15 by , 7 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?
comment:16 by , 7 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 , 7 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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 :)
Ticket retargeted after milestone closed