Details Ticket 5118


Comment | Reply | Take | Open


Serial Number 5118
Subject v.db.droptable: an 'ERROR' is always issued though the command completes OK
Area grass6
Queue grass
Requestors tutey@o2.pl
Owner none
Status resolved
Last User Contact Thu May 10 17:51:41 2007 (1 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Thu May 10 21:38:09 2007 (1 yr ago)
Created Sun Sep 10 11:40:50 2006 (2 yr ago)

Transaction History Ticket 5118


Sun, Sep 10 2006 11:40:50    Request created by guest  
Subject: v.db.droptable: an 'ERROR' is always issued though the command completes
OK

Platform: GNU/Linux/x86
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 2006-09-08

Although v.db.droptable works as expected and removes the reqested table, it
always issues an 'ERROR' in the end, which is not good - the user *will* think
something went wrong indeed.

Example:

$ v.db.droptable map=ditches layer=1 Removing following table name connected
to selected layer: ditches
Removing table <ditches> linked to layer <1> of vector map <ditches>
Are you sure (y/n)? [n]
y
Dropping table <ditches>...
Current attribute table link(s):
ERROR: Database connection for map <ditches> is not defined in DB file

Maciek
Mon, Sep 11 2006 09:39:11    Mail sent by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Mon, 11 Sep 2006 19:38:59 +1200
From Hamish <hamish_nospam@yahoo.com>
To Request Tracker <grass-bugs@intevation.de>
Cc grass-dev@grass.itc.it
Subject Re: [GRASS-dev] [bug #5118] (grass) v.db.droptable: an 'ERROR' is always issued though the command completes OK
Message-Id <20060911193859.0d60336a.hamish_nospam@yahoo.com>
In-Reply-To <20060910094050.9620F1005AB@lists.intevation.de>
References <20060910094050.9620F1005AB@lists.intevation.de>
X-Mailer Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-2.3 tagged_above=-999 required=3 tests=[BAYES_00=-5, FORGED_YAHOO_RCVD=2.7]
X-Spam-Level
> this bug's URL: http://intevation.de/rt/webrt?serial_num=5118
> ---------------------------------------------------------------------
> 
> Subject: v.db.droptable: an 'ERROR' is always issued though the
> command completes OK
..
> Although v.db.droptable works as expected and removes the reqested
> table, it always issues an 'ERROR' in the end, which is not good - the
> user *will* think something went wrong indeed.
> 
> Example:
> 
> $ v.db.droptable map=ditches layer=1 Removing following table name
> connected to selected layer: ditches Removing table <ditches> linked
> to layer <1> of vector map <ditches> Are you sure (y/n)? [n]
> y
> Dropping table <ditches>...
> Current attribute table link(s):
> ERROR: Database connection for map <ditches> is not defined in DB file


I've added a line to the script in CVS to make the error message more
instructive.

I can't send the "ERROR:" message to /dev/null as "v.db.connect -p"
sends its output to stderr. This should probably be changed to stdout.


Hamish


Wed, May 9 2007 21:00:21    Mail sent by mneteler  
Is this ok or still an issue?

Markus
Wed, May 9 2007 21:50:32    Mail sent by msieczka  
mneteler wrote (Wed, May 9 2007 21:00:21):

> Is this ok or still an issue?

Still an issue. Hamish fixed v.db.droptable to issue additional message "(No
database links remaining)", but the "ERROR:" line is still printed, which is
wrong (even if it cannot be fixed).

Moreover, v.db.droptable is still an *interactive* module.

Maciek
Thu, May 10 2007 03:23:03    Mail sent by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Thu, 10 May 2007 13:22:52 +1200
From Hamish <hamish_nospam@yahoo.com>
To Markus Neteler <neteler@itc.it>
Cc grass-bugs@intevation.de, grass-dev@grass.itc.it
Subject Re: [GRASS-dev] [bug #5118] (grass) v.db.droptable: an 'ERROR' is always issued though the command completes OK
Message-Id <20070510132252.152dd0db.hamish_nospam@yahoo.com>
In-Reply-To <20070509201155.GE3931@bartok.itc.it>
References <20070509195032.19A691006CD@lists.intevation.de> <20070509201155.GE3931@bartok.itc.it>
X-Mailer Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, score=-3.151 tagged_above=-999 required=3.5 tests=[BAYES_00=-5, FORGED_YAHOO_RCVD=1.849]
X-Spam-Score -3.151
X-Spam-Level
Markus Neteler wrote:
> 
> v.db.droptable mmmm
> Removing following table name connected to selected layer: mmmm
> Removing table <mmmm> linked to layer <1> of vector map <mmmm>
> You must use the force flag to actually remove the the table. Exiting.
> 
> I think that the "Removing.." message need some fine tuning (maybe
> conditionalized) to be less confusing.


The first "Removing" line is redundant? (and missing "the")

becomes:
> GRASS> v.db.droptable mmmm
> Removing table <mmmm> linked to layer <1> of vector map <mmmm>
> You must use the force flag to actually remove the the table. Exiting.


Hamish


Thu, May 10 2007 17:51:40    Mail sent by neteler@itc.it  
Return-Path <neteler@itc.it>
Delivered-To grass-bugs@lists.intevation.de
X-AuditID d94d5003-af43ebb000002d28-0c-46433efbaa72
Date Thu, 10 May 2007 08:48:33 +0200
From Markus Neteler <neteler@itc.it>
To grass-bugs@intevation.de
Cc grass-dev@grass.itc.it
Subject Re: [GRASS-dev] [bug #5118] (grass) v.db.droptable: an 'ERROR' is always issued though the command completes OK
Message-ID <20070510064833.GB27008@bartok.itc.it>
Mail-Followup-To grass-bugs@intevation.de, grass-dev@grass.itc.it
References <20070509195032.19A691006CD@lists.intevation.de> <20070509201155.GE3931@bartok.itc.it> <20070510132252.152dd0db.hamish_nospam@yahoo.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
In-Reply-To <20070510132252.152dd0db.hamish_nospam@yahoo.com>
User-Agent Mutt/1.4.2.2i
X-PGP-Key http://www.gdf-hannover.de/neteler/markus_gpgkey.asc
X-PGP-Fingerprint D4D5 2F80 120E AD60 E2F6 2297 21B3 D02B E1E7 E789
Sender Markus Neteler <neteler@itc.it>
X-FBK Yes
X-Brightmail-Tracker AAAAAA==
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, score=-4.038 tagged_above=-999 required=3.5 tests=[BAYES_00=-5, DATE_IN_PAST_06_12=0.827, FORGED_RCVD_HELO=0.135]
X-Spam-Score -4.038
X-Spam-Level
On Thu, May 10, 2007 at 01:22:52PM +1200, Hamish wrote:
> Markus Neteler wrote:
> > 
> > v.db.droptable mmmm
> > Removing following table name connected to selected layer: mmmm
> > Removing table <mmmm> linked to layer <1> of vector map <mmmm>
> > You must use the force flag to actually remove the the table. Exiting.
> > 
> > I think that the "Removing.." message need some fine tuning (maybe
> > conditionalized) to be less confusing.
> 
> 
> The first "Removing" line is redundant? (and missing "the")

OK, removed.
 
> becomes:
> > GRASS> v.db.droptable mmmm
> > Removing table <mmmm> linked to layer <1> of vector map <mmmm>
> > You must use the force flag to actually remove the the table. Exiting.

I have also found a trick for the confusing error message. Now it looks
like this:

GRASS 6.3.cvs (spearfish60):~ > g.copy vect=roads,random --o
Copy vector <roads@PERMANENT> to current mapset as <random>
WARNING: The vector 'random' already exists and will be overwritten.

GRASS 6.3.cvs (spearfish60):~ > v.db.droptable random
Removing table <random> linked to layer <1> of vector map <random>
You must use the force flag to actually remove the table. Exiting.

GRASS 6.3.cvs (spearfish60):~ > v.db.droptable random -f
Removing table <random> linked to layer <1> of vector map <random>
Dropping table <random>...
Current attribute table link(s):
(No database links remaining)

This should solve all problems mentioned in the bug report.

Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------


Thu, May 10 2007 17:51:41    Mail sent by neteler@itc.it  
Return-Path <neteler@itc.it>
Delivered-To grass-bugs@lists.intevation.de
X-AuditID d94d5003-ae03cbb000002d28-15-46433efd7bc7
Date Wed, 9 May 2007 22:11:55 +0200
From Markus Neteler <neteler@itc.it>
To Maciek Sieczka via RT <grass-bugs@intevation.de>
Cc grass-dev@grass.itc.it
Subject Re: [GRASS-dev] [bug #5118] (grass) v.db.droptable: an 'ERROR' is always issued though the command completes OK
Message-ID <20070509201155.GE3931@bartok.itc.it>
Mail-Followup-To Maciek Sieczka via RT <grass-bugs@intevation.de>, grass-dev@grass.itc.it
References <20070509195032.19A691006CD@lists.intevation.de>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
In-Reply-To <20070509195032.19A691006CD@lists.intevation.de>
User-Agent Mutt/1.4.2.2i
X-PGP-Key http://www.gdf-hannover.de/neteler/markus_gpgkey.asc
X-PGP-Fingerprint D4D5 2F80 120E AD60 E2F6 2297 21B3 D02B E1E7 E789
Sender Markus Neteler <neteler@itc.it>
X-FBK Yes
X-Brightmail-Tracker AAAAAA==
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, score=-3.618 tagged_above=-999 required=3.5 tests=[BAYES_00=-5, DATE_IN_PAST_12_24=1.247, FORGED_RCVD_HELO=0.135]
X-Spam-Score -3.618
X-Spam-Level
On Wed, May 09, 2007 at 09:50:32PM +0200, Maciek Sieczka via RT wrote:
> mneteler wrote (Wed, May 9 2007 21:00:21):
> 
> > Is this ok or still an issue?
> 
> Still an issue. Hamish fixed v.db.droptable to issue additional message "(No
> database links remaining)", but the "ERROR:" line is still printed, which is
> wrong (even if it cannot be fixed).

I start to understand what you mean :)

v.db.droptable -f mmmm
Removing following table name connected to selected layer: mmmm
Removing table <mmmm> linked to layer <1> of vector map <mmmm>
Dropping table <mmmm>...
Current attribute table link(s):
ERROR: Database connection for map <mmmm> is not defined in DB file
(No database links remaining)

 
> Moreover, v.db.droptable is still an *interactive* module.

Fixed in CVS. Now it does:

v.db.droptable mmmm
Removing following table name connected to selected layer: mmmm
Removing table <mmmm> linked to layer <1> of vector map <mmmm>
You must use the force flag to actually remove the the table. Exiting.

I think that the "Removing.." message need some fine tuning (maybe
conditionalized) to be less confusing.

Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------


Thu, May 10 2007 21:38:09    Status changed to resolved by msieczka  
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