Simplify logic in Spec.normalize()

This commit is contained in:
Todd Gamblin 2017-09-10 16:41:54 -07:00
parent de7e99f866
commit 14cd73ed3c

View File

@ -2183,13 +2183,13 @@ def normalize(self, force=False):
if not self.name: if not self.name:
raise SpecError("Attempting to normalize anonymous spec") raise SpecError("Attempting to normalize anonymous spec")
if self._normal and not force: # Set _normal and _concrete to False when forced
return False
# avoid any assumptions about concreteness when forced
if force: if force:
self._mark_concrete(False) self._mark_concrete(False)
if self._normal:
return False
# Ensure first that all packages & compilers in the DAG exist. # Ensure first that all packages & compilers in the DAG exist.
self.validate_or_raise() self.validate_or_raise()
# Get all the dependencies into one DependencyMap # Get all the dependencies into one DependencyMap