summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch
diff options
context:
space:
mode:
authorJakub Kądziołka <[email protected]>2020-07-23 21:43:06 +0200
committerJakub Kądziołka <[email protected]>2020-07-23 21:43:06 +0200
commitd726b954baaeff876ce9728e00920fa45f529f9a (patch)
tree4b767b7586a1082dd2691bc33c3e45ace044e6e5 /gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch
parent9a74a7db8626bc139307d115f5cec2648f5273ad (diff)
parente165a2492d73d37c8b95d6970d453b9d88911ee6 (diff)
Merge branch 'master' into core-updates
Conflicts: gnu/packages/ruby.scm
Diffstat (limited to 'gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch')
-rw-r--r--gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch b/gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch
new file mode 100644
index 0000000000..1358e30633
--- /dev/null
+++ b/gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch
@@ -0,0 +1,21 @@
+Do not override PYTHONPATH when calling Python code from the Haskell
+daemons. This is necessary because the Python library dependencies are
+only available through PYTHONPATH.
+
+diff --git a/src/Ganeti/Query/Exec.hs b/src/Ganeti/Query/Exec.hs
+--- a/src/Ganeti/Query/Exec.hs
++++ b/src/Ganeti/Query/Exec.hs
+@@ -99,12 +99,10 @@ spawnJobProcess jid = withErrorLogAt CRITICAL (show jid) $
+ do
+ use_debug <- isDebugMode
+ env_ <- (M.toList . M.insert "GNT_DEBUG" (if use_debug then "1" else "0")
+- . M.insert "PYTHONPATH" AC.pythondir
+ . M.fromList)
+ `liftM` getEnvironment
+ execPy <- P.jqueueExecutorPy
+ logDebug $ "Executing " ++ AC.pythonPath ++ " " ++ execPy
+- ++ " with PYTHONPATH=" ++ AC.pythondir
+
+ (master, child) <- pipeClient connectConfig
+ let (rh, wh) = clientToHandle child
+