[GRASS-dev] [GRASS GIS] #2681: Remove legacy meaning of LOCATION variable
GRASS GIS
trac at osgeo.org
Thu May 21 01:22:26 PDT 2015
#2681: Remove legacy meaning of LOCATION variable
-------------------------+-------------------------------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: task | Status: new
Priority: blocker | Milestone: 8.0.0
Component: Startup | Version: svn-trunk
Resolution: | Keywords: init, grass.py, interface, CLI,
CPU: | environment variables
Unspecified | Platform: All
-------------------------+-------------------------------------------------
Comment (by glynn):
Replying to [comment:2 wenzeslaus]:
> There is some export somewhere even now. I can do:
>
{{{
GRASS > echo $LOCATION
.../grassdata/nc_spm_08_grass7/user1
}}}
>
> It seems that [source:grass/trunk/lib/init/grass.py#L1421
bash_startup()] is to blame.
There is no export. LOCATION is a shell variable, not an environment
variable.
> So then I would say that if #2679 functionality will be implemented
(rather then dropped)
I see no reason to implement it. And if it is implemented, the startup
script should explicitly remove those variables from the environment.
> This would leave the "gisrc" file the only occurrence of LOCATION_NAME
That's already the case.
> What we could do for 7 series is to introduce forward compatibility and
provide `LOCATION` as an alternative for `LOCATION_NAME`. This would
require changes to `g.gisenv` and related library functions but it seems
possible (although I haven't checked source code yet).
Unless you're going to make g.gisenv automatically map LOCATION to
LOCATION_NAME, it would require changes to anything which uses it (e.g.
lib/python/script and a number of scripts).
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2681#comment:3>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list