diff options
author | Mario Melara <maamelara@gmail.com> | 2016-04-08 12:44:27 -0700 |
---|---|---|
committer | Mario Melara <maamelara@gmail.com> | 2016-04-08 12:44:27 -0700 |
commit | 01a36ab33341e2af91c6e6f5ca58efbeecfb6ec4 (patch) | |
tree | 83d0206d143661ca74042f22ebd478fc8ec52f88 /lib | |
parent | 5bcd1e7ccd9ff6568c06a13998f2d552d1b37b60 (diff) | |
download | spack-01a36ab33341e2af91c6e6f5ca58efbeecfb6ec4.tar.gz spack-01a36ab33341e2af91c6e6f5ca58efbeecfb6ec4.tar.bz2 spack-01a36ab33341e2af91c6e6f5ca58efbeecfb6ec4.tar.xz spack-01a36ab33341e2af91c6e6f5ca58efbeecfb6ec4.zip |
Changed the logic of concretize. We don't have to worry about whether the part of the spec is a string since any string parsed is made into an object via the Arch constructor. Any dependencies will take the root arch spec as well
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/concretize.py | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 14edcf1f3d..3422e86ae8 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -220,39 +220,29 @@ class DefaultConcretizer(object): return True # Things changed def _concretize_operating_system(self, spec): - if spec.architecture.platform_os is not None: - if isinstance(spec.architecture.platform_os,spack.architecture.OperatingSystem): - return False - else: - spec.add_operating_system_from_string(spec.architecture.platform_os) - return True #changed + platform = spec.architecture.platform + if spec.architecture.platform_os is not None and isinstance( + spec.architecture.platform_os,spack.architecture.OperatingSystem): + return False + if spec.root.architecture and spec.root.architecture.platform_os: if isinstance(spec.root.architecture.platform_os,spack.architecture.OperatingSystem): spec.architecture.platform_os = spec.root.architecture.platform_os - else: - spec.add_operating_system_from_string(spec.root.architecture.platform_os) else: spec.architecture.platform_os = spec.architecture.platform.operating_system('default_os') - - return True #changed + return True #changed def _concretize_target(self, spec): - if spec.architecture.target is not None: - if isinstance(spec.architecture.target,spack.architecture.Target): - return False - else: - spec.add_target_from_string(spec.architecture.target) - return True #changed - + platform = spec.architecture.platform + if spec.architecture.target is not None and isinstance( + spec.architecture.target, spack.architecture.Target): + return False if spec.root.architecture and spec.root.architecture.target: if isinstance(spec.root.architecture.target,spack.architecture.Target): spec.architecture.target = spec.root.architecture.target - else: - spec.add_target_from_string(spec.root.architecture.target) else: spec.architecture.target = spec.architecture.platform.target('default_target') - - return True #changed + return True #changed def concretize_architecture(self, spec): """If the spec is empty provide the defaults of the platform. If the |