Added external module check in normalize to avoid infinite loop

This commit is contained in:
Mario Melara 2016-05-28 10:12:53 -07:00
parent 9dad7c2ace
commit becec8ac7e

View File

@ -1002,11 +1002,12 @@ def _expand_virtual_packages(self):
""" """
# Make an index of stuff this spec already provides # Make an index of stuff this spec already provides
self_index = ProviderIndex(self.traverse(), restrict=True) self_index = ProviderIndex(self.traverse(), restrict=True)
changed = False changed = False
done = False done = False
while not done: while not done:
done = True done = True
for spec in list(self.traverse()): for spec in list(self.traverse()):
replacement = None replacement = None
if spec.virtual: if spec.virtual:
@ -1329,7 +1330,7 @@ def _normalize_helper(self, visited, spec_deps, provider_index):
# if we descend into a virtual spec, there's nothing more # if we descend into a virtual spec, there's nothing more
# to normalize. Concretize will finish resolving it later. # to normalize. Concretize will finish resolving it later.
if self.virtual or self.external: if self.virtual or self.external or self.external_module:
return False return False
# Combine constraints from package deps with constraints from # Combine constraints from package deps with constraints from
@ -1376,7 +1377,6 @@ def normalize(self, force=False):
# Ensure first that all packages & compilers in the DAG exist. # Ensure first that all packages & compilers in the DAG exist.
self.validate_names() self.validate_names()
# Get all the dependencies into one DependencyMap # Get all the dependencies into one DependencyMap
spec_deps = self.flat_dependencies(copy=False) spec_deps = self.flat_dependencies(copy=False)