From d2c2c46541d54e4dcde34e6199ba5dafa949bef1 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Tue, 5 Jan 2016 11:12:14 -0800 Subject: [PATCH] bug hunting --- lib/spack/spack/compilers/__init__.py | 4 ++-- lib/spack/spack/config.py | 2 +- lib/spack/spack/spec.py | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 6731318f43..87106282cf 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -216,9 +216,9 @@ def compiler_for_spec(compiler_spec, target): assert(compiler_spec.concrete) compilers = compilers_for_spec(compiler_spec) if target.compiler_strategy == "PATH": - filter(lambda c: c.modules is None, compilers) + compilers = [c for c in compilers if c.modules is None] elif target.compiler_strategy == "MODULES": - filter(lambda c: c.modules is not None, compilers) + compilers = [c for c in compilers if c.modules is not None] assert(len(compilers) == 1) return compilers[0] diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index d66ffb338e..6e11cfa475 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -277,7 +277,7 @@ def is_spec_nobuild(spec): def spec_externals(spec): - """Return a list of spec, directory pairs for each external location for spec""" + """Return a list of spec, directory, module triples for each external location for spec""" allpkgs = get_packages_config() name = spec.name spec_locations = [] diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index f496011d62..126ffc4f95 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -771,8 +771,9 @@ def _replace_with(self, concrete): """Replace this virtual spec with a concrete spec.""" assert(self.virtual) for name, dependent in self.dependents.items(): - del dependent.dependencies[self.name] - dependent._add_dependency(concrete) + if not dependent.external: + del dependent.dependencies[self.name] + dependent._add_dependency(concrete) def _expand_virtual_packages(self):