[GRASS-dev] modules have problems with @mapset

Glynn Clements glynn at gclements.plus.com
Fri Feb 15 04:25:16 EST 2008


Hamish wrote:

> > > It is trying to append _{$TMP} after map at mapset instead of just
> > > 'map'.
> > > 
> > > Try this:
> > >   http://trac.osgeo.org/grass/changeset/30118
> > > (really please try that, I haven't tested it)
> > > 
> > > +++ /grass/trunk/scripts/v.db.addtable/v.db.addtable (revision
> > 30118)
> > > @@ -88,18 +88,20 @@
> > >     g.message -e  "Vector map '$GIS_OPT_MAP' not found in current
> > > mapset"
> > >     exit 1
> > > +else
> > > +   MAP_NAME=`echo "$GIS_OPT_MAP" | cut -f1 -d'@'`
> > >  fi
> 
> Glynn:
> > Completely bogus. Reverted.
> >
> > This just papers over the symptoms without fixing anything.
> >
> > If the name includes a mapset which isn't the current one, that's an
> > error. You don't just discard the mapset.
> 
> note that was placed after a test to see if the map existed in the
> current mapset. I now am reminded of the case where the user wants to
> use somemap at othermapset when there is already a map of the same name in
> the current.

Sorry. I completely mis-read what that line was doing. It's removing
the mapset when the check *succeeds*.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list