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
This commit is contained in:
parent
794b60f7e7
commit
badf3368ad
@ -43,6 +43,7 @@ def update_kwargs_from_args(args, kwargs):
|
|||||||
'dirty': args.dirty,
|
'dirty': args.dirty,
|
||||||
'use_cache': args.use_cache,
|
'use_cache': args.use_cache,
|
||||||
'cache_only': args.cache_only,
|
'cache_only': args.cache_only,
|
||||||
|
'include_build_deps': args.include_build_deps,
|
||||||
'explicit': True, # Always true for install command
|
'explicit': True, # Always true for install command
|
||||||
'stop_at': args.until,
|
'stop_at': args.until,
|
||||||
'unsigned': args.unsigned,
|
'unsigned': args.unsigned,
|
||||||
@ -105,6 +106,11 @@ def setup_parser(subparser):
|
|||||||
'--cache-only', action='store_true', dest='cache_only', default=False,
|
'--cache-only', action='store_true', dest='cache_only', default=False,
|
||||||
help="only install package from binary mirrors")
|
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(
|
subparser.add_argument(
|
||||||
'--no-check-signature', action='store_true',
|
'--no-check-signature', action='store_true',
|
||||||
dest='unsigned', default=False,
|
dest='unsigned', default=False,
|
||||||
|
@ -1367,7 +1367,6 @@ def install(self):
|
|||||||
|
|
||||||
pkg, pkg_id, spec = task.pkg, task.pkg_id, task.pkg.spec
|
pkg, pkg_id, spec = task.pkg, task.pkg_id, task.pkg.spec
|
||||||
tty.verbose('Processing {0}: task={1}'.format(pkg_id, task))
|
tty.verbose('Processing {0}: task={1}'.format(pkg_id, task))
|
||||||
|
|
||||||
# Ensure that the current spec has NO uninstalled dependencies,
|
# Ensure that the current spec has NO uninstalled dependencies,
|
||||||
# which is assumed to be reflected directly in its priority.
|
# which is assumed to be reflected directly in its priority.
|
||||||
#
|
#
|
||||||
@ -1967,7 +1966,8 @@ def get_deptypes(self, pkg):
|
|||||||
(tuple) required dependency type(s) for the package
|
(tuple) required dependency type(s) for the package
|
||||||
"""
|
"""
|
||||||
deptypes = ['link', 'run']
|
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')
|
deptypes.append('build')
|
||||||
if self.run_tests(pkg):
|
if self.run_tests(pkg):
|
||||||
deptypes.append('test')
|
deptypes.append('test')
|
||||||
|
@ -1020,7 +1020,7 @@ _spack_info() {
|
|||||||
_spack_install() {
|
_spack_install() {
|
||||||
if $list_options
|
if $list_options
|
||||||
then
|
then
|
||||||
SPACK_COMPREPLY="-h --help --only -u --until -j --jobs --overwrite --fail-fast --keep-prefix --keep-stage --dont-restage --use-cache --no-cache --cache-only --no-check-signature --require-full-hash-match --show-log-on-error --source -n --no-checksum -v --verbose --fake --only-concrete -f --file --clean --dirty --test --run-tests --log-format --log-file --help-cdash --cdash-upload-url --cdash-build --cdash-site --cdash-track --cdash-buildstamp -y --yes-to-all"
|
SPACK_COMPREPLY="-h --help --only -u --until -j --jobs --overwrite --fail-fast --keep-prefix --keep-stage --dont-restage --use-cache --no-cache --cache-only --include-build-deps --no-check-signature --require-full-hash-match --show-log-on-error --source -n --no-checksum -v --verbose --fake --only-concrete -f --file --clean --dirty --test --run-tests --log-format --log-file --help-cdash --cdash-upload-url --cdash-build --cdash-site --cdash-track --cdash-buildstamp -y --yes-to-all"
|
||||||
else
|
else
|
||||||
_all_packages
|
_all_packages
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user