summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoreugeneswalker <38933153+eugeneswalker@users.noreply.github.com>2020-12-03 15:27:01 -0800
committerGitHub <noreply@github.com>2020-12-03 15:27:01 -0800
commitbadf3368ad863fd0b7b81a45e14d8302490a4e29 (patch)
treef1acda3c843342685764c587a61936e32848309c /lib
parent794b60f7e719b4a96ce0fa2a09774a9b6239e58d (diff)
downloadspack-badf3368ad863fd0b7b81a45e14d8302490a4e29.tar.gz
spack-badf3368ad863fd0b7b81a45e14d8302490a4e29.tar.bz2
spack-badf3368ad863fd0b7b81a45e14d8302490a4e29.tar.xz
spack-badf3368ad863fd0b7b81a45e14d8302490a4e29.zip
allow install of build-deps from cache via --include-build-deps switch (#19955)
* allow install of build-deps from cache via --include-build-deps switch * make clear that --include-build-deps is useful for CI pipeline troubleshooting
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/install.py6
-rw-r--r--lib/spack/spack/installer.py4
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py
index 8f3902d71c..0957c75212 100644
--- a/lib/spack/spack/cmd/install.py
+++ b/lib/spack/spack/cmd/install.py
@@ -43,6 +43,7 @@ def update_kwargs_from_args(args, kwargs):
'dirty': args.dirty,
'use_cache': args.use_cache,
'cache_only': args.cache_only,
+ 'include_build_deps': args.include_build_deps,
'explicit': True, # Always true for install command
'stop_at': args.until,
'unsigned': args.unsigned,
@@ -106,6 +107,11 @@ the dependencies"""
help="only install package from binary mirrors")
subparser.add_argument(
+ '--include-build-deps', action='store_true', dest='include_build_deps',
+ default=False, help="""include build deps when installing from cache,
+which is useful for CI pipeline troubleshooting""")
+
+ subparser.add_argument(
'--no-check-signature', action='store_true',
dest='unsigned', default=False,
help="do not check signatures of binary packages")
diff --git a/lib/spack/spack/installer.py b/lib/spack/spack/installer.py
index b70528dea2..1d8c637d32 100644
--- a/lib/spack/spack/installer.py
+++ b/lib/spack/spack/installer.py
@@ -1367,7 +1367,6 @@ class PackageInstaller(object):
pkg, pkg_id, spec = task.pkg, task.pkg_id, task.pkg.spec
tty.verbose('Processing {0}: task={1}'.format(pkg_id, task))
-
# Ensure that the current spec has NO uninstalled dependencies,
# which is assumed to be reflected directly in its priority.
#
@@ -1967,7 +1966,8 @@ class BuildRequest(object):
(tuple) required dependency type(s) for the package
"""
deptypes = ['link', 'run']
- if not self.install_args.get('cache_only'):
+ include_build_deps = self.install_args.get('include_build_deps')
+ if not self.install_args.get('cache_only') or include_build_deps:
deptypes.append('build')
if self.run_tests(pkg):
deptypes.append('test')