Opened 9 years ago

Closed 8 years ago

#2506 closed defect (worksforme)

g.rename fails to rename map when there is already map of the same name in PERMENENT

Reported by: annakrat Owned by: grass-dev@…
Priority: normal Milestone: 7.0.5
Component: Default Version: svn-trunk
Keywords: g.rename Cc:
CPU: Unspecified Platform: Unspecified

Description

In a mapset (different than PERMANENT) I run:

g.rename raster=mymap,elevation
WARNING: <elevation> already exists in mapset <PERMANENT>

It doesn't rename it. When I use overwrite, it works. Still it seems it's a bug.

Also when I add there my current mapset, it fails, and I thought we decided that current mapset should be supported when specifying output map names.

g.rename raster=mymap,elevation@mycurrentmapset
WARNING: Illegal filename <elevation@mycurrentmapset>. Character <@> not allowed.
WARNING: <elevation@mycurrentmapset> is an illegal file name

Change History (5)

comment:1 by martinl, 9 years ago

The map is not renamed because G70 still uses abbreviated element names (ie. rast). g.rename silently fails because of source:grass/branches/releasebranch_7_0/lib/manage/list.c#L47

comment:2 by martinl, 9 years ago

In GRASS 71 (trunk) it works.

in reply to:  2 comment:3 by wenzeslaus, 9 years ago

Replying to martinl:

In GRASS 71 (trunk) it works.

Not for me with older trunk. I have r62726 (before any renaming) and I'm getting:

 > r.mapcalc "aaa = 1"
 100%
 > g.list rast mapset=.
aaa
 > g.rename rast=aaa,elevation
WARNING: <elevation> already exists in mapset <PERMANENT>
 > g.list rast mapset=.
aaa
 > g.rename rast=aaa,elevation --o
Rename raster <aaa> to <elevation>
 > g.list rast mapset=.
elevation
GRASS version: 7.1.svn                                                          
GRASS SVN Revision: 62726M                                                      
Build Date: 2014-11-18                                                          
Build Platform: x86_64-unknown-linux-gnu                                        
GDAL/OGR: 1.10.1                                                                
PROJ.4: 4.8.0                                                                   
GEOS: 3.4.2                                                                     
SQLite: 3.8.2                                                                   
Python: 2.7.6                                                                   
wxPython: 2.8.12.1                                                              
Platform: Linux-3.13.0-40-generic-x86_64-with-Ubuntu-14.04-trusty               

comment:4 by martinl, 8 years ago

Milestone: 7.0.07.0.5

comment:5 by martinl, 8 years ago

Resolution: worksforme
Status: newclosed

No activity last 21 months, closing, feel free to reopen if needed.

Note: See TracTickets for help on using tickets.