From 5765cbe86cae4df7204b5fd58843355454ad754b Mon Sep 17 00:00:00 2001
From: Damian Alvarez <d.alvarez@fz-juelich.de>
Date: Tue, 5 Oct 2021 12:20:09 +0200
Subject: [PATCH] To avoid bugging too much the core team when deploying a new
 stage

---
 Custom_Hooks/eb_hooks.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Custom_Hooks/eb_hooks.py b/Custom_Hooks/eb_hooks.py
index 848a70a4c..9f1df986b 100644
--- a/Custom_Hooks/eb_hooks.py
+++ b/Custom_Hooks/eb_hooks.py
@@ -320,7 +320,7 @@ def pre_ready_hook(self, *args, **kwargs):
     override_toolchain_check = os.getenv("JSC_OVERRIDE_TOOLCHAIN_CHECK")
     if not override_toolchain_check:
         toolchain_name = toolchain["name"]
-        if not toolchain_name in SUPPORTED_TOOLCHAIN_FAMILIES:
+        if not toolchain_name in SUPPORTED_TOOLCHAIN_FAMILIES and os.getenv('USER') is not 'swmanage':
             stage = os.getenv("STAGE", default=None)
             if stage:
                 # Clean things up if it is a Devel stage
@@ -345,7 +345,7 @@ def pre_ready_hook(self, *args, **kwargs):
 
     # Don't let people install GCCcore since this probably won't work and will lead them
     # to reinstall most of our stack. Don't advertise that this can be overridden, only
-    # experts should know that.
+    # experts should know that. This applies just to user installations
     override_gcccore_check = os.getenv("JSC_OVERRIDE_GCCCORE_CHECK")
     if not override_gcccore_check:
         if is_gcccore and not "stages" in install_path().lower():
@@ -365,7 +365,7 @@ def pre_ready_hook(self, *args, **kwargs):
     # overridden, only experts should know that)
     override_mpi_check = os.getenv("JSC_OVERRIDE_MPI_CHECK")
     if not override_mpi_check:
-        if is_mpi and GOLDEN_REPO not in path_to_ec:
+        if is_mpi and GOLDEN_REPO not in path_to_ec and os.getenv('USER') is not 'swmanage':
             print_warning(
                 "\nYou are attempting to install a non-system MPI implementation (%s), "
                 "this is very likely to lead to severe performance degradation. Please "
-- 
GitLab