[GRASS-dev] Re: [GRASS-CVS] hamish: grass6/lib/init init.sh, 1.119, 1.120

Hamish hamish_nospam at yahoo.com
Mon Oct 8 06:03:25 EDT 2007


Markus Neteler wrote:
> > Author: hamish
..
> > Modified Files:
> >         init.sh
> > Log Message:
> > add test so don't overwrite VAR file without testing. I just
> > commented the whole thing out though after fixing it, as the VAR and
> > $MAPSET/dbf/ should be created on demand. To a raster-only or
> > postgres-only user they are just file pollution.  code bug #502
> > 
> > Index: init.sh
> > ===================================================================
> > RCS file: /grassrepository/grass6/lib/init/init.sh,v
> > retrieving revision 1.119
> > retrieving revision 1.120
> > diff -u -d -r1.119 -r1.120
> > --- init.sh     3 Oct 2007 08:30:48 -0000       1.119
> > +++ init.sh     6 Oct 2007 05:04:58 -0000       1.120
> > @@ -495,9 +495,10 @@
> >                         cp "$GISDBASE/$LOCATION_NAME/PERMANENT/WIND"
> > "$LOCATION/WIND" echo "Missing WIND file fixed"
> >                         # predefine DBF driver
> > -                       echo "DB_DRIVER: dbf" > "$LOCATION/VAR"
> > -                       echo "DB_DATABASE: \$GISDBASE/\
> > $LOCATION_NAME/\$MAPSET/dbf/" >> "$LOCATION/VAR"
> > -                       mkdir "$LOCATION"/dbf
> > +                       #  why is this needed ??
> > +                       #echo "DB_DRIVER: dbf" > "$LOCATION/VAR"
> > +                       #echo "DB_DATABASE: \$GISDBASE/\
> > $LOCATION_NAME/\$MAPSET/dbf/" >> "$LOCATION/VAR"
> > +                       #mkdir "$LOCATION"/dbf
> 
Markus:
> This is needed, if you start GRASS from CMD line with
> full path to a non-existing mapset (which is then created).
> So this should be restored somehow.

so

#typo
user:~ $ grass63 grassdata/spearfish60/user11

Is meant to create:
grassdata/spearfish60/user11/VAR
grassdata/spearfish60/user11/WIND
grassdata/spearfish60/user11/dbf/


(current CVS makes the new mapset but not the VAR and dbf/)

?
I would think we should throw an error if the mapset doesn't exist
(typo), and some '-n' flag is needed to create a new mapset from the
command line.
?


And don't create the VAR and dbf/ until needed. (why do those need to
exist before any vector maps with tables are created?)
?


Hamish




More information about the grass-dev mailing list