summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2017-09-10 16:41:54 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2017-09-11 17:13:21 -0700
commit14cd73ed3ce3f7d02782f72917c70071d2a6c091 (patch)
tree56f047fafa5d1fca0f133da8322c86a91a87f2c4
parentde7e99f866e37c94dacdccd4c16dea4eabe2fdbb (diff)
downloadspack-14cd73ed3ce3f7d02782f72917c70071d2a6c091.tar.gz
spack-14cd73ed3ce3f7d02782f72917c70071d2a6c091.tar.bz2
spack-14cd73ed3ce3f7d02782f72917c70071d2a6c091.tar.xz
spack-14cd73ed3ce3f7d02782f72917c70071d2a6c091.zip
Simplify logic in Spec.normalize()
-rw-r--r--lib/spack/spack/spec.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 910788c81a..56a6b9b4d6 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -2183,13 +2183,13 @@ class Spec(object):
if not self.name:
raise SpecError("Attempting to normalize anonymous spec")
- if self._normal and not force:
- return False
-
- # avoid any assumptions about concreteness when forced
+ # Set _normal and _concrete to False when forced
if force:
self._mark_concrete(False)
+ if self._normal:
+ return False
+
# Ensure first that all packages & compilers in the DAG exist.
self.validate_or_raise()
# Get all the dependencies into one DependencyMap