diff options
Diffstat (limited to 'patches/rstudio-server-multi-version/0002-sessionProcessConfig-Configure-R-version-from-active.patch')
| -rw-r--r-- | patches/rstudio-server-multi-version/0002-sessionProcessConfig-Configure-R-version-from-active.patch | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/patches/rstudio-server-multi-version/0002-sessionProcessConfig-Configure-R-version-from-active.patch b/patches/rstudio-server-multi-version/0002-sessionProcessConfig-Configure-R-version-from-active.patch index 8b70bd0..2b19cb0 100644 --- a/patches/rstudio-server-multi-version/0002-sessionProcessConfig-Configure-R-version-from-active.patch +++ b/patches/rstudio-server-multi-version/0002-sessionProcessConfig-Configure-R-version-from-active.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 8202e0ae8276285afcdeee1fbec50a744a7171ff Mon Sep 17 00:00:00 2001 | 1 | From 242819ba38ed77e28629737dff9bfd5410ec1fdc Mon Sep 17 00:00:00 2001 |
| 2 | From: Ricardo Wurmus <rekado@elephly.net> | 2 | From: Ricardo Wurmus <rekado@elephly.net> |
| 3 | Date: Fri, 18 Dec 2020 10:32:01 +0100 | 3 | Date: Fri, 18 Dec 2020 10:32:01 +0100 |
| 4 | Subject: [PATCH 2/7] sessionProcessConfig: Configure R version from active | 4 | Subject: [PATCH 2/7] sessionProcessConfig: Configure R version from active |
| @@ -13,24 +13,24 @@ be used to launch the embedded R. | |||
| 13 | Configure R environment using the R version that has been recorded in | 13 | Configure R environment using the R version that has been recorded in |
| 14 | the active session. | 14 | the active session. |
| 15 | --- | 15 | --- |
| 16 | src/cpp/server/ServerSessionManager.cpp | 44 ++++++++++++++++++++++++- | 16 | .../server/session/ServerSessionManager.cpp | 44 ++++++++++++++++++- |
| 17 | 1 file changed, 43 insertions(+), 1 deletion(-) | 17 | 1 file changed, 43 insertions(+), 1 deletion(-) |
| 18 | 18 | ||
| 19 | diff --git a/src/cpp/server/ServerSessionManager.cpp b/src/cpp/server/ServerSessionManager.cpp | 19 | diff --git a/src/cpp/server/session/ServerSessionManager.cpp b/src/cpp/server/session/ServerSessionManager.cpp |
| 20 | index 22f138a6ad..01be702a83 100644 | 20 | index d4da986378..28d3248606 100644 |
| 21 | --- a/src/cpp/server/ServerSessionManager.cpp | 21 | --- a/src/cpp/server/session/ServerSessionManager.cpp |
| 22 | +++ b/src/cpp/server/ServerSessionManager.cpp | 22 | +++ b/src/cpp/server/session/ServerSessionManager.cpp |
| 23 | @@ -2,6 +2,7 @@ | 23 | @@ -2,6 +2,7 @@ |
| 24 | * ServerSessionManager.cpp | 24 | * ServerSessionManager.cpp |
| 25 | * | 25 | * |
| 26 | * Copyright (C) 2021 by RStudio, PBC | 26 | * Copyright (C) 2022 by Posit Software, PBC |
| 27 | + * Copyright (C) 2020-2021 Ricardo Wurmus | 27 | + * Copyright (C) 2020-2025 Ricardo Wurmus |
| 28 | * | 28 | * |
| 29 | * Unless you have received this program directly from RStudio pursuant | 29 | * Unless you have received this program directly from Posit Software pursuant |
| 30 | * to the terms of a commercial license agreement with RStudio, then | 30 | * to the terms of a commercial license agreement with Posit Software, then |
| 31 | @@ -21,10 +22,14 @@ | 31 | @@ -22,10 +23,14 @@ |
| 32 | |||
| 33 | #include <shared_core/SafeConvert.hpp> | 32 | #include <shared_core/SafeConvert.hpp> |
| 33 | #include <core/SocketRpc.hpp> | ||
| 34 | #include <core/system/Process.hpp> | 34 | #include <core/system/Process.hpp> |
| 35 | +#include <shared_core/system/User.hpp> | 35 | +#include <shared_core/system/User.hpp> |
| 36 | #include <core/system/PosixUser.hpp> | 36 | #include <core/system/PosixUser.hpp> |
| @@ -43,7 +43,7 @@ index 22f138a6ad..01be702a83 100644 | |||
| 43 | #include <monitor/MonitorClient.hpp> | 43 | #include <monitor/MonitorClient.hpp> |
| 44 | #include <session/SessionConstants.hpp> | 44 | #include <session/SessionConstants.hpp> |
| 45 | 45 | ||
| 46 | @@ -156,7 +161,44 @@ core::system::ProcessConfig sessionProcessConfig( | 46 | @@ -160,7 +165,44 @@ core::system::ProcessConfig sessionProcessConfig( |
| 47 | std::copy(extraArgs.begin(), extraArgs.end(), std::back_inserter(args)); | 47 | std::copy(extraArgs.begin(), extraArgs.end(), std::back_inserter(args)); |
| 48 | 48 | ||
| 49 | // append R environment variables | 49 | // append R environment variables |
| @@ -64,7 +64,7 @@ index 22f138a6ad..01be702a83 100644 | |||
| 64 | + &presult); | 64 | + &presult); |
| 65 | + if (rError) | 65 | + if (rError) |
| 66 | + LOG_ERROR(rError); | 66 | + LOG_ERROR(rError); |
| 67 | + | 67 | + |
| 68 | + FilePath homeDir = FilePath(presult.stdOut); | 68 | + FilePath homeDir = FilePath(presult.stdOut); |
| 69 | + FilePath userScratchPath_ = core::system::xdg::userDataDir(context.username, homeDir); | 69 | + FilePath userScratchPath_ = core::system::xdg::userDataDir(context.username, homeDir); |
| 70 | + | 70 | + |
| @@ -90,5 +90,5 @@ index 22f138a6ad..01be702a83 100644 | |||
| 90 | environment.insert(environment.end(), rEnvVars.begin(), rEnvVars.end()); | 90 | environment.insert(environment.end(), rEnvVars.begin(), rEnvVars.end()); |
| 91 | 91 | ||
| 92 | -- | 92 | -- |
| 93 | 2.33.0 | 93 | 2.49.0 |
| 94 | 94 | ||
