summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@googlemail.com>2017-08-26 05:40:37 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2017-08-25 20:40:37 -0700
commit005b22aa8b8a68a5d0afe3fc3d06f8e1d85b35da (patch)
tree56d08af858426509f7720946b83b7c0e2c2fd250
parent91143e9db4ee82c24bfbd1582e3ab9ff6a78f8d3 (diff)
downloadspack-005b22aa8b8a68a5d0afe3fc3d06f8e1d85b35da.tar.gz
spack-005b22aa8b8a68a5d0afe3fc3d06f8e1d85b35da.tar.bz2
spack-005b22aa8b8a68a5d0afe3fc3d06f8e1d85b35da.tar.xz
spack-005b22aa8b8a68a5d0afe3fc3d06f8e1d85b35da.zip
Removed default value for 'dirty' function argument. (#5109)
This change is done to avoid inconsistencies during refactoring. The rationale is that functions at different levels in the call stack all define a default for the 'dirty' argument. This PR removes the default value for all the functions except the top-level one (`PackageBase.do_install`). In this way not defining 'dirty' will result in an error, instead of the default value being used. This will reduce the risk of having an inconsistent behavior after a refactoring.
-rw-r--r--lib/spack/spack/build_environment.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 7bef1d3789..a27d8c68ab 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -178,7 +178,7 @@ def set_compiler_environment_variables(pkg, env):
return env
-def set_build_environment_variables(pkg, env, dirty=False):
+def set_build_environment_variables(pkg, env, dirty):
"""Ensure a clean install environment when we build packages.
This involves unsetting pesky environment variables that may
@@ -450,7 +450,7 @@ def load_external_modules(pkg):
load_module(dep.external_module)
-def setup_package(pkg, dirty=False):
+def setup_package(pkg, dirty):
"""Execute all environment setup routines."""
spack_env = EnvironmentModifications()
run_env = EnvironmentModifications()
@@ -516,7 +516,7 @@ def setup_package(pkg, dirty=False):
spack_env.apply_modifications()
-def fork(pkg, function, dirty=False):
+def fork(pkg, function, dirty):
"""Fork a child process to do part of a spack build.
Args: