On 05/10/07 15:28, [email protected] wrote:
code I item #502, was opened at 2007-10-05 10:28 Status: Open
Priority: 3 Submitted By: Eric Patton (eric) Assigned to: Nobody
(None) Summary: Grass 6.3 fails to apply database connection changes
via db.connect Issue type: module bug Issue status: None GRASS
version: CVS HEAD GRASS component: None Operating system: Linux
Operating system version: Ubuntu 7.04 GRASS CVS checkout date, if
applies (YYMMDD): 071005
Initial Comment: I noticed that Grass 6.3 cvs doesn't 'remember' the
database changes that were applied during the last session:
Markus wrote:
Absolutely. I was also suprised yesterday and added a workaround
in lib/init/init.sh (to restore DBF if the VAR file is missing).
But I wonder what is deleting this file. This is a pretty new bug.
I actually have the feeling that your workaround actually is the
problem. You added this to init.sh:
# 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
But I don't see any conditioning around this, so IIUC driver and
database will always be set to dbf of the mapset at each startup. It
probably needs a test for the dbf directory around it. Something like
(not a bash expert):
if [ ! -e $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/];
then
echo "DB_DRIVER: dbf" > "$LOCATION/VAR"
echo "DB_DATABASE: \$GISDBASE/\$LOCATION_NAME/\$MAPSET/dbf/" >>
"$LOCATION/VAR"
mkdir "$LOCATION"/dbf
fi
Moritz
_______________________________________________
grass-dev mailing list
[email protected]
http://grass.itc.it/mailman/listinfo/grass-dev