Details Ticket 837


Comment | Reply | Take | Open


Serial Number 837
Subject g.remove: mapset bug
Area none
Queue grass
Requestors jidanni@yahoo.com.tw
Owner none
Status resolved
Last User Contact Fri Nov 30 06:10:51 2001 (7 yr ago)
Current Priority 70
Final Priority 70
Due No date assigned
Last Action Tue Jan 8 14:17:16 2002 (7 yr ago)
Created Fri Nov 16 16:32:26 2001 (7 yr ago)

Transaction History Ticket 837


Fri, Nov 16 2001 16:32:26    Request created by jidanni@yahoo.com.tw  
Return-Path <neteler@itc.it>
Delivered-To grass-bugs@lists.intevation.de
Resent-Message-Id <200111161532.fAGFWLd29540@thuille.itc.it.>
To Markus Neteler <neteler@itc.it>
Subject g.remove
From Dan Jacobson <jidanni@yam.com.tw>
Reply-To jidanni@yahoo.com.tw
User-Agent Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7
Date 16 Nov 2001 23:02:28 +0800
Message-ID <m2wv0qzrln.fsf@Mdan.jacobson.tw>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Resent-From neteler@itc.it
Resent-Date Fri, 16 Nov 2001 16:32:21 +0100
Resent-To grass-bugs@intevation.de
it keeps telling me to remove a file that doesn't exist....


$ g.list type=rast mapset=jidanni 
----------------------------------------------
raster files available in mapset jidanni:
pipeline

----------------------------------------------
0grass$ g.list type=rast mapset=jidanni |egrep -v :\|-|xargs -n 1 g.remove
[pipeline@jidanni] is base map. Remove reclassed map first:
 pipeline3@jidanni
0grass$ g.remove pipeline3
REMOVE [pipeline3]
 raster   MISSING
 header   MISSING
 category MISSING
 color    MISSING
 history  MISSING
 misc     MISSING
 fcell    MISSING
 g3dcell  MISSING
0grass$ g.remove pipeline 
[pipeline@jidanni] is base map. Remove reclassed map first:
 pipeline3@jidanni
0grass$ g.remove pipeline3@jidanni
REMOVE [pipeline3@jidanni]
 raster   MISSING
 header   MISSING
 category MISSING
 color    MISSING
 history  MISSING
 misc     MISSING
 fcell    MISSING
 g3dcell  MISSING
0grass$ find $LOCATION|grep pipe
/home/jidanni/tmp/grass/../grassdata/leics/jidanni/cell/pipeline
/home/jidanni/tmp/grass/../grassdata/leics/jidanni/cell_misc/pipeline
/home/jidanni/tmp/grass/../grassdata/leics/jidanni/cell_misc/pipeline/null
/home/jidanni/tmp/grass/../grassdata/leics/jidanni/cell_misc/pipeline/range
/home/jidanni/tmp/grass/../grassdata/leics/jidanni/cell_misc/pipeline/reclassed_to
/home/jidanni/tmp/grass/../grassdata/leics/jidanni/hist/pipeline
/home/jidanni/tmp/grass/../grassdata/leics/jidanni/cellhd/pipeline
/home/jidanni/tmp/grass/../grassdata/leics/jidanni/cats/pipeline

oh, I can remove it manually from g.remove:
enter raster file to be removed
Enter 'list' for a list of existing raster files
Hit RETURN to cancel request
> pipeline
<pipeline>
Ok to remove [pipeline]? (y/n) y
REMOVE [pipeline]
 raster   
 header   
 category 
 color    MISSING
 history  
 misc     
 fcell    MISSING
 g3dcell  MISSING


by the way, too bad there is no g.list "all" to see everything at once.


Fri, Nov 16 2001 18:31:26    Priority changed to 70 by mneteler  
Sat, Nov 17 2001 01:22:29    Status changed to resolved by gclements  
Sat, Nov 17 2001 01:23:18    Mail sent by glynn.clements@virgin.net  
Return-Path <glynn.clements@virgin.net>
Delivered-To grass-bugs@lists.intevation.de
From Glynn Clements <glynn.clements@virgin.net>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <15349.44206.178644.815207@cerise.nosuchdomain.co.uk>
Date Sat, 17 Nov 2001 00:17:50 +0000
To Request Tracker <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Subject Re: [GRASS5] [bug #837] (grass) g.remove
In-Reply-To <20011116153226.F257713A0B@lists.intevation.de>
References <20011116153226.F257713A0B@lists.intevation.de>
X-Mailer VM 6.94 under 21.4 (patch 4) "Artificial Intelligence (candidate #1)" XEmacs Lucid
Request Tracker wrote:

> it keeps telling me to remove a file that doesn't exist....
> 
> 
> $ g.list type=rast mapset=jidanni 
> ----------------------------------------------
> raster files available in mapset jidanni:
> pipeline
> 
> ----------------------------------------------
> 0grass$ g.list type=rast mapset=jidanni |egrep -v :\|-|xargs -n 1 g.remove
> [pipeline@jidanni] is base map. Remove reclassed map first:
>  pipeline3@jidanni
> 0grass$ g.remove pipeline3
> REMOVE [pipeline3]
>  raster   MISSING
>  header   MISSING
>  category MISSING
>  color    MISSING
>  history  MISSING
>  misc     MISSING
>  fcell    MISSING
>  g3dcell  MISSING

OK, pipeline3 doesn't exist now ...

> 0grass$ g.remove pipeline 
> [pipeline@jidanni] is base map. Remove reclassed map first:
>  pipeline3@jidanni

... but it did once, and was presumably removed by means other than
g.remove.

Conclusion: if you remove a reclass map by means other than g.remove
(e.g. "rm"), you can't remove the base map with g.remove.

If this is a problem, the half-baked attempt at tracking reclass maps
will need to go altogether.

Note: g.remove cannot reasonably be made to remove "reclassed_to"
entries for reclass maps which no longer exists.

Under normal circumstances g.remove:

1. calls G_is_reclass() to determine the base map from the reclass
map's "cellhd" file.
2. calls G_is_reclassed_to() for the base map to verify the reclass.
3. removes the reclass map from the base map's "reclassed_to" file.
4. deletes the reclass map's files.

Once the reclass map's files have been deleted, G_is_reclass() won't
work, and can't work (at least, not without checking every
"reclassed_to" file which it can find).

This is just user error, so I'm changing this to "resolved".

-- 
Glynn Clements <glynn.clements@virgin.net>


Sat, Nov 17 2001 01:23:18    Status changed to open by _rt_system  
Thu, Nov 29 2001 21:22:35    Mail sent by guest  
Hi again on the g.remove/mapset bug.

I can confirm that it exists:

RASS:~ > g.list rast
----------------------------------------------
raster files available in mapset user1:
archheights  fields.areas   file2    streams.thin  v1        vegcover.clump
archrast     fields.areas1  mysoils  test          v1.clump

raster files available in mapset PERMANENT:
aspect          landuse       rushmore       soils.Tfactor   trn.sites
density         owner         slope          spot.image      uparea
elevation.dem   quads         soil.br.depth  streams         vegcover
elevation.dted  railroads     soils          strm.dist
erode.index     residential   soils.Kfactor  texture
fields          roads         soils.ph       tractids
geology         rstrct.areas  soils.range    transport.misc

----------------------------------------------
GRASS:~ > g.remove vegcover.clump
[vegcover.clump@user1] is a base map. Remove reclassed map first:
 vegcover.1000@user1
 
Looks like a bug to me,

 Markus
Thu, Nov 29 2001 21:36:42    Subject changed to g.remove: mapset bug by mneteler  
Fri, Nov 30 2001 00:15:45    Mail sent by mneteler  
See new extended report #863

Markus
Fri, Nov 30 2001 06:10:51    Mail sent by glynn.clements@virgin.net  
Return-Path <glynn.clements@virgin.net>
Delivered-To grass-bugs@lists.intevation.de
From Glynn Clements <glynn.clements@virgin.net>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <15367.4448.467539.672646@cerise.nosuchdomain.co.uk>
Date Fri, 30 Nov 2001 04:56:00 +0000
To guest user via RT <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Subject Re: [GRASS5] [bug #837] (grass) g.remove
In-Reply-To <20011129202235.CDB9813A13@lists.intevation.de>
References <20011129202235.CDB9813A13@lists.intevation.de>
X-Mailer VM 6.94 under 21.4 (patch 4) "Artificial Intelligence (candidate #1)" XEmacs Lucid
guest user via RT wrote:

> Hi again on the g.remove/mapset bug.
> 
> I can confirm that it exists:
> 
> RASS:~ > g.list rast
> ----------------------------------------------
> raster files available in mapset user1:
> archheights  fields.areas   file2    streams.thin  v1        vegcover.clump
> archrast     fields.areas1  mysoils  test          v1.clump
> 
> raster files available in mapset PERMANENT:
> aspect          landuse       rushmore       soils.Tfactor   trn.sites
> density         owner         slope          spot.image      uparea
> elevation.dem   quads         soil.br.depth  streams         vegcover
> elevation.dted  railroads     soils          strm.dist
> erode.index     residential   soils.Kfactor  texture
> fields          roads         soils.ph       tractids
> geology         rstrct.areas  soils.range    transport.misc
> 
> ----------------------------------------------
> GRASS:~ > g.remove vegcover.clump
> [vegcover.clump@user1] is a base map. Remove reclassed map first:
>  vegcover.1000@user1
>  
> Looks like a bug to me,

Looks like user error to me. See my previous message on the subject.

-- 
Glynn Clements <glynn.clements@virgin.net>


Tue, Jan 8 2002 14:17:16    Status changed to resolved by mneteler  
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request