On Sat, October 6, 2007 09:53, Markus Neteler wrote: > On Sat, Oct 06, 2007 at 07:05:00AM +0200, [EMAIL PROTECTED] wrote: >> Author: hamish >> >> Update of /grassrepository/grass6/lib/init >> In directory doto:/tmp/cvs-serv6411 >> >> 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 > > > This is needed, if you start GRASS from CMD line with > full path to a non-existing mapset (which is then created).
Why is the dbf path creation needed ? You might never want to use dbf on this new mapset... I guess the automatic dbf path creation should be part of db.connect... > Above was there for many months without problems. The recent > problem seems to arise from a different modification. Yes, the revision just before (http://freegis.org/cgi-bin/viewcvs.cgi/grass6/lib/init/init.sh.diff?r1=1.118&r2=1.119): =================================================================== RCS file: /home/grass/grassrepository/grass6/lib/init/init.sh,v retrieving revision 1.118 retrieving revision 1.119 diff -u -r1.118 -r1.119 --- grass6/lib/init/init.sh 2007/09/20 14:18:01 1.118 +++ grass6/lib/init/init.sh 2007/10/03 08:30:48 1.119 @@ -1,7 +1,7 @@ #!/bin/sh ############################################################################# # -# $Id: init.sh,v 1.118 2007/09/20 14:18:01 moritz Exp $ +# $Id: init.sh,v 1.119 2007/10/03 08:30:48 markus Exp $ # # MODULE: GRASS Initialization # AUTHOR(S): Original author unknown - probably CERL @@ -685,6 +685,11 @@ echo "Building user fontcap ..." g.mkfontcap fi + +# predefine DBF driver if DB connection not defined +echo "DB_DRIVER: dbf" > "$LOCATION/VAR" +echo "DB_DATABASE: \$GISDBASE/\$LOCATION_NAME/\$MAPSET/dbf/" >> "$LOCATION/VAR" +mkdir "$LOCATION"/dbf trap "" 2 3 15 Moritz _______________________________________________ grass-dev mailing list [email protected] http://grass.itc.it/mailman/listinfo/grass-dev

