[GRASS-dev] [bug #5118] (grass) v.db.droptable: an 'ERROR' is always issued though the command completes OK

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

-------------------------------------------- Managed by Request Tracker

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 :slight_smile:

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

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

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