[GRASS-dev] [GRASS GIS] #2109: connect error in replacement of $MAPSET

#2109: connect error in replacement of $MAPSET
------------------------+---------------------------------------------------
Reporter: lucadelu | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Temporal | Version: svn-trunk
Keywords: connection | Platform: All
      Cpu: All |
------------------------+---------------------------------------------------
Hi all,

when I try to use a different mapset then PERMANENT using $MAPSET variable
it is not changed with the right value but a $MAPSET directory is create
on the location path

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2109&gt;
GRASS GIS <http://grass.osgeo.org>

#2109: connect error in replacement of $MAPSET
------------------------+---------------------------------------------------
Reporter: lucadelu | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Temporal | Version: svn-trunk
Keywords: connection | Platform: All
      Cpu: All |
------------------------+---------------------------------------------------

Comment(by huhabla):

You can use:
{{{
eval `g.gisenv`
}}}

To set $GISDBASE, $LOCATION_NAME and $MAPSET

I will modify the code of t.connect so that instead of the shell variables
$GISDBASE and $LOCATION_NAME the real path variables are set in the module
help to reduce confusion.

t.connect accepts as database argument a string that defines a database
connection. In case of sqlite this must be a path. t.connect will not
substitute shell variables itself if they are not set.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2109#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#2109: connect error in replacement of $MAPSET
--------------------------+-------------------------------------------------
  Reporter: lucadelu | Owner: grass-dev@…
      Type: enhancement | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: Temporal | Version: svn-trunk
Resolution: fixed | Keywords: connection
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Changes (by huhabla):

  * status: new => closed
  * type: defect => enhancement
  * resolution: => fixed

Comment:

Replying to [comment:1 huhabla]:
> You can use:
> {{{
> eval `g.gisenv`
> }}}
>
> To set $GISDBASE, $LOCATION_NAME and $MAPSET
>
> I will modify the code of t.connect so that instead of the shell
variables $GISDBASE and $LOCATION_NAME the real path variables are set in
the module help to reduce confusion.

Done in r58015

>
> t.connect accepts as database argument a string that defines a database
connection. In case of sqlite this must be a path. t.connect will not
substitute shell variables itself if they are not set.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2109#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#2109: connect error in replacement of $MAPSET
--------------------------+-------------------------------------------------
  Reporter: lucadelu | Owner: grass-dev@…
      Type: enhancement | Status: reopened
  Priority: normal | Milestone: 7.0.0
Component: Temporal | Version: svn-trunk
Resolution: | Keywords: connection
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Changes (by lucadelu):

  * status: closed => reopened
  * resolution: fixed =>

Comment:

Replying to [comment:2 huhabla]:
> Replying to [comment:1 huhabla]:
> > You can use:
> > {{{
> > eval `g.gisenv`
> > }}}
> >
> > To set $GISDBASE, $LOCATION_NAME and $MAPSET
> >
> > I will modify the code of t.connect so that instead of the shell
variables $GISDBASE and $LOCATION_NAME the real path variables are set in
the module help to reduce confusion.
>
> Done in r58015
>

Sorry I don't understand what was done, I have the same behavior of
yesterday, If I use

{{{
t.connect database='$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/tgis.db'
}}}

the database is created in

{{{
/grassdata/eu_laea/$MAPSET/sqlite/tgis.db
}}}

The revision I'm using is 58021.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2109#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#2109: connect error in replacement of $MAPSET
--------------------------+-------------------------------------------------
  Reporter: lucadelu | Owner: grass-dev@…
      Type: enhancement | Status: reopened
  Priority: normal | Milestone: 7.0.0
Component: Temporal | Version: svn-trunk
Resolution: | Keywords: connection
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------

Comment(by huhabla):

This issue is hopefully fixed in r58024.

Now the temporal framework supports '$GISBASE/$LOCATION_NAME/$MAPSET'
settings and will substitute them correctly. t.connect should show now the
same behavior as db.connect.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2109#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#2109: connect error in replacement of $MAPSET
--------------------------+-------------------------------------------------
  Reporter: lucadelu | Owner: grass-dev@…
      Type: enhancement | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: Temporal | Version: svn-trunk
Resolution: fixed | Keywords: connection
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Changes (by lucadelu):

  * status: reopened => closed
  * resolution: => fixed

Comment:

Replying to [comment:4 huhabla]:
> This issue is hopefully fixed in r58024.
>

Fixed, thanks a lot

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2109#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>