Repository navigation
Conversation
…e by a single dict object at the class level. Use dynamic attributes to avoid repeating the access code. Separate env modification from path retrieval as in OSGeo#6469.
… it is a user-provided path)
# Conflicts: # CMakeLists.txt # cmake/modules/GRASSInstallDirs.cmake # gui/wxpython/gui_core/ghelp.py # gui/wxpython/lmgr/frame.py # gui/wxpython/main_window/frame.py # python/grass/app/resource_paths.py # python/grass/script/utils.py # scripts/g.search.modules/g.search.modules.py
G_locale_dir() calls G_fatal_error() when GRASS_LOCALEDIR is not set, and G_fatal_error() translates its message, which re-enters G_init_locale() and recurses until the stack overflows. Read the variable directly and skip bindtextdomain() when it is not set, matching the pre-existing behavior for GISBASE. Likely the cause of the g.proj stack overflow (0xC00000FD) seen on Windows CI in the FHS preparation PR. Found and fixed with Claude Code.
# Conflicts: # general/CMakeLists.txt
runtime_env_is_active() treated GISBASE on PATH as an active runtime, so ensure_runtime_env() skipped the setup when a wrapper script (such as the OSGeo4W env.bat) set only GISBASE. The GRASS_*DIR variables were then missing and tools failed with "Incomplete GRASS session: Variable 'GRASS_ETCDIR' not set", e.g., in create_project(). Require all resource directory variables for an active runtime, and derive them from an existing GISBASE instead of the build-time prefix, which points elsewhere for a relocated installation. Investigated and written with the help of Claude Code.
Tools run directly by a program which sets only GISBASE and GISRC failed with "Incomplete GRASS session: Variable 'GRASS_ETCDIR' not set" because G_etc_dir() and the other resource directory getters required their GRASS_*DIR variable. When the variable is not set, use GISBASE with a path relative to it. CMake computes the relative paths from the install layout, so they also work with FHS. The defaults are the legacy layout, which is the only one Autotools produces. G_init_locale() gets the same fallback so that translations keep working. Investigated and written with the help of Claude Code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extra fixes for OSGeo#5630