diff options
Diffstat (limited to 'lib/spack/spack/cmd/fetch.py')
-rw-r--r-- | lib/spack/spack/cmd/fetch.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/spack/spack/cmd/fetch.py b/lib/spack/spack/cmd/fetch.py index 85b2ab429e..8eb9fffa07 100644 --- a/lib/spack/spack/cmd/fetch.py +++ b/lib/spack/spack/cmd/fetch.py @@ -69,14 +69,10 @@ def fetch(parser, args): for spec in specs: if args.missing or args.dependencies: - for s in spec.traverse(): - package = spack.repo.get(s) - + for s in spec.traverse(root=False): # Skip already-installed packages with --missing - if args.missing and package.installed: + if args.missing and s.installed: continue - package.do_fetch() - - package = spack.repo.get(spec) - package.do_fetch() + s.package.do_fetch() + spec.package.do_fetch() |