bug hunting

This commit is contained in:
Gregory Becker 2016-01-05 11:12:14 -08:00
parent 751208cedf
commit d2c2c46541
3 changed files with 6 additions and 5 deletions

View file

@ -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]

View file

@ -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 = []

View file

@ -771,6 +771,7 @@ def _replace_with(self, concrete):
"""Replace this virtual spec with a concrete spec."""
assert(self.virtual)
for name, dependent in self.dependents.items():
if not dependent.external:
del dependent.dependencies[self.name]
dependent._add_dependency(concrete)