spack fetch: don't fetch externals. (#6124)
Fixes #6123 spack fetch shouldn't attempt to fetch external deps when invoked with --dependencies.
This commit is contained in:
parent
5a4544ab05
commit
12f0725e9f
@ -40,7 +40,7 @@ def setup_parser(subparser):
|
|||||||
help="do not check packages against checksum")
|
help="do not check packages against checksum")
|
||||||
subparser.add_argument(
|
subparser.add_argument(
|
||||||
'-m', '--missing', action='store_true',
|
'-m', '--missing', action='store_true',
|
||||||
help="also fetch all missing dependencies")
|
help="fetch only missing (not yet installed) dependencies")
|
||||||
subparser.add_argument(
|
subparser.add_argument(
|
||||||
'-D', '--dependencies', action='store_true',
|
'-D', '--dependencies', action='store_true',
|
||||||
help="also fetch all dependencies")
|
help="also fetch all dependencies")
|
||||||
@ -61,8 +61,15 @@ def fetch(parser, args):
|
|||||||
if args.missing or args.dependencies:
|
if args.missing or args.dependencies:
|
||||||
for s in spec.traverse():
|
for s in spec.traverse():
|
||||||
package = spack.repo.get(s)
|
package = spack.repo.get(s)
|
||||||
|
|
||||||
|
# Skip already-installed packages with --missing
|
||||||
if args.missing and package.installed:
|
if args.missing and package.installed:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Do not attempt to fetch externals (they're local)
|
||||||
|
if package.spec.external:
|
||||||
|
continue
|
||||||
|
|
||||||
package.do_fetch()
|
package.do_fetch()
|
||||||
|
|
||||||
package = spack.repo.get(spec)
|
package = spack.repo.get(spec)
|
||||||
|
Loading…
Reference in New Issue
Block a user