summaryrefslogtreecommitdiff
path: root/lib/spack/spack/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/spack/package.py')
-rw-r--r--lib/spack/spack/package.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 686bbc2e1e..b6a2d2de8d 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -1519,6 +1519,15 @@ class PackageBase(with_metaclass(PackageMeta, PackageViewMixin, object)):
dirty = kwargs.get('dirty', False)
restage = kwargs.get('restage', False)
+ # install_self defaults True and is popped so that dependencies are
+ # always installed regardless of whether the root was installed
+ install_self = kwargs.pop('install_package', True)
+ # explicit defaults False so that dependents are implicit regardless
+ # of whether their dependents are implicitly or explicitly installed.
+ # Spack ensures root packages of install commands are always marked to
+ # install explicit
+ explicit = kwargs.pop('explicit', False)
+
# For external packages the workflow is simplified, and basically
# consists in module file generation and registration in the DB
if self.spec.external:
@@ -1568,6 +1577,9 @@ class PackageBase(with_metaclass(PackageMeta, PackageViewMixin, object)):
if install_deps:
Package._install_bootstrap_compiler(self, **kwargs)
+ if not install_self:
+ return
+
# Then, install the package proper
tty.msg(colorize('@*{Installing} @*g{%s}' % self.name))