diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2017-03-05 21:41:18 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2017-08-01 17:40:54 -0700 |
commit | 36b3dd8cfe1b932bd60f13606e9bfe23d8d91ffd (patch) | |
tree | f5e59d97ee4a0ef7e51ceb86f8d8a7319621df71 /lib | |
parent | b9606e3157652b6fd65868afd44f6fc1fb02d204 (diff) | |
download | spack-36b3dd8cfe1b932bd60f13606e9bfe23d8d91ffd.tar.gz spack-36b3dd8cfe1b932bd60f13606e9bfe23d8d91ffd.tar.bz2 spack-36b3dd8cfe1b932bd60f13606e9bfe23d8d91ffd.tar.xz spack-36b3dd8cfe1b932bd60f13606e9bfe23d8d91ffd.zip |
Package.possible_dependencies() descends into virtuals.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/package.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 5729836873..ff8c629ee7 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -601,10 +601,19 @@ class PackageBase(with_metaclass(PackageMeta, object)): visited.add(self.name) for name in self.dependencies: - if name not in visited and not spack.spec.Spec(name).virtual: + if name in visited: + continue + + spec = spack.spec.Spec(name) + if not spec.virtual: pkg = spack.repo.get(name) for name in pkg.possible_dependencies(visited): visited.add(name) + else: + for provider in spack.repo.providers_for(spec): + pkg = spack.repo.get(provider.name) + for name in pkg.possible_dependencies(visited): + visited.add(name) return visited |