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
This commit is contained in:
parent
5bcd1e7ccd
commit
01a36ab333
1 changed files with 11 additions and 21 deletions
|
@ -220,39 +220,29 @@ def concretize_version(self, spec):
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue