summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/cmd/diy.py7
-rw-r--r--lib/spack/spack/cmd/install.py6
-rw-r--r--lib/spack/spack/cmd/setup.py7
-rw-r--r--lib/spack/spack/package.py3
4 files changed, 18 insertions, 5 deletions
diff --git a/lib/spack/spack/cmd/diy.py b/lib/spack/spack/cmd/diy.py
index 487654d261..1a3e2fd65c 100644
--- a/lib/spack/spack/cmd/diy.py
+++ b/lib/spack/spack/cmd/diy.py
@@ -52,6 +52,10 @@ def setup_parser(subparser):
subparser.add_argument(
'spec', nargs=argparse.REMAINDER,
help="specs to use for install. Must contain package AND version.")
+ subparser.add_argument(
+ '--dirty', action='store_true', dest='dirty',
+ help="Install a package *without* cleaning the environment. " +
+ "Or set SPACK_DIRTY environment variable")
def diy(self, args):
@@ -100,4 +104,5 @@ def diy(self, args):
keep_prefix=args.keep_prefix,
ignore_deps=args.ignore_deps,
verbose=not args.quiet,
- keep_stage=True) # don't remove source dir for DIY.
+ keep_stage=True, # don't remove source dir for DIY.
+ dirty=args.dirty or ('SPACK_DIRTY' in os.environ))
diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py
index 7663a97a28..a77af37ed0 100644
--- a/lib/spack/spack/cmd/install.py
+++ b/lib/spack/spack/cmd/install.py
@@ -28,6 +28,7 @@ import llnl.util.tty as tty
import spack
import spack.cmd
+import os
description = "Build and install packages"
@@ -56,7 +57,8 @@ def setup_parser(subparser):
help="Fake install. Just remove prefix and create a fake file.")
subparser.add_argument(
'--dirty', action='store_true', dest='dirty',
- help="Install a package *without* cleaning the environment.")
+ help="Install a package *without* cleaning the environment. " +
+ "Or set SPACK_DIRTY environment variable")
subparser.add_argument(
'packages', nargs=argparse.REMAINDER,
help="specs of packages to install")
@@ -88,5 +90,5 @@ def install(parser, args):
run_tests=args.run_tests,
verbose=args.verbose,
fake=args.fake,
- dirty=args.dirty,
+ dirty=args.dirty or ('SPACK_DIRTY' in os.environ),
explicit=True)
diff --git a/lib/spack/spack/cmd/setup.py b/lib/spack/spack/cmd/setup.py
index b55e102c0e..66095ee628 100644
--- a/lib/spack/spack/cmd/setup.py
+++ b/lib/spack/spack/cmd/setup.py
@@ -46,6 +46,10 @@ def setup_parser(subparser):
subparser.add_argument(
'spec', nargs=argparse.REMAINDER,
help="specs to use for install. Must contain package AND version.")
+ subparser.add_argument(
+ '--dirty', action='store_true', dest='dirty',
+ help="Install a package *without* cleaning the environment. " +
+ "Or set SPACK_DIRTY environment variable")
def setup(self, args):
@@ -91,4 +95,5 @@ def setup(self, args):
ignore_deps=args.ignore_deps,
verbose=args.verbose,
keep_stage=True, # don't remove source dir for SETUP.
- install_phases=set(['setup', 'provenance']))
+ install_phases=set(['setup', 'provenance']),
+ dirty=args.dirty or ('SPACK_DIRTY' in os.environ))
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 882901d887..38bc6fa3f4 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -916,7 +916,8 @@ class Package(object):
skip_patch=skip_patch,
verbose=verbose,
make_jobs=make_jobs,
- run_tests=run_tests)
+ run_tests=run_tests,
+ dirty=dirty)
# Set run_tests flag before starting build.
self.run_tests = run_tests