Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix HOME env #459

Merged
merged 8 commits into from
Jun 29, 2023
Merged

fix HOME env #459

merged 8 commits into from
Jun 29, 2023

Conversation

anikaweinmann
Copy link
Member

@anikaweinmann anikaweinmann commented Jun 29, 2023

The HOME environment variable was set to /tmp/:/root to fix this the env attributes are now subdivided into:

  1. variables where use self.env and enviroment variable values (used for ["PATH", "PYTHONPATH"])
  2. use self.env value for the rest (HOME is before set to $HOME if $HOME is set)

resulting in:

GISBASE=/usr/local/grass
GISRC=/tmp/tmplc_46gr7/gisrc
LD_LIBRARY_PATH=/usr/local/grass/lib
GRASS_ADDON_PATH=/root/.grass8/addons/
GRASS_VERSION=7.7.svn
PYTHONPATH=:/usr/local/grass/etc/python
GRASS_MESSAGE_FORMAT=plain
GRASS_SKIP_MAPSET_OWNER_CHECK=1
GRASS_TGIS_RAISE_ON_ERROR=1
GIS_LOCK=48
HOME=/root
GRASS_ADDON_BASE=/root/.grass8/addons/
PATH=/usr/local/grass/bin:/usr/local/grass/scripts:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

@anikaweinmann anikaweinmann requested a review from mmacata June 29, 2023 06:14
@@ -113,7 +114,6 @@ def set_grass_environment(

"""
self.env["GIS_LOCK"] = str(os.getpid())
self.env["HOME"] = "/tmp/"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. I still wonder why it worked for the webserver and not for the worker.

@anikaweinmann anikaweinmann merged commit b46e9c7 into main Jun 29, 2023
@anikaweinmann anikaweinmann added this to the 4.9.2 milestone Jun 29, 2023
@mmacata mmacata deleted the fix_HOME_env branch August 15, 2024 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants