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.
This commit is contained in:
Massimiliano Culpo 2017-08-26 05:40:37 +02:00 committed by Todd Gamblin
parent 91143e9db4
commit 005b22aa8b

View File

@ -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: