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,38 +220,28 @@ def concretize_version(self, spec):
|
||||||
return True # Things changed
|
return True # Things changed
|
||||||
|
|
||||||
def _concretize_operating_system(self, spec):
|
def _concretize_operating_system(self, spec):
|
||||||
if spec.architecture.platform_os is not None:
|
platform = spec.architecture.platform
|
||||||
if isinstance(spec.architecture.platform_os,spack.architecture.OperatingSystem):
|
if spec.architecture.platform_os is not None and isinstance(
|
||||||
|
spec.architecture.platform_os,spack.architecture.OperatingSystem):
|
||||||
return False
|
return False
|
||||||
else:
|
|
||||||
spec.add_operating_system_from_string(spec.architecture.platform_os)
|
|
||||||
return True #changed
|
|
||||||
if spec.root.architecture and spec.root.architecture.platform_os:
|
if spec.root.architecture and spec.root.architecture.platform_os:
|
||||||
if isinstance(spec.root.architecture.platform_os,spack.architecture.OperatingSystem):
|
if isinstance(spec.root.architecture.platform_os,spack.architecture.OperatingSystem):
|
||||||
spec.architecture.platform_os = spec.root.architecture.platform_os
|
spec.architecture.platform_os = spec.root.architecture.platform_os
|
||||||
else:
|
|
||||||
spec.add_operating_system_from_string(spec.root.architecture.platform_os)
|
|
||||||
else:
|
else:
|
||||||
spec.architecture.platform_os = spec.architecture.platform.operating_system('default_os')
|
spec.architecture.platform_os = spec.architecture.platform.operating_system('default_os')
|
||||||
|
|
||||||
return True #changed
|
return True #changed
|
||||||
|
|
||||||
def _concretize_target(self, spec):
|
def _concretize_target(self, spec):
|
||||||
if spec.architecture.target is not None:
|
platform = spec.architecture.platform
|
||||||
if isinstance(spec.architecture.target,spack.architecture.Target):
|
if spec.architecture.target is not None and isinstance(
|
||||||
|
spec.architecture.target, spack.architecture.Target):
|
||||||
return False
|
return False
|
||||||
else:
|
|
||||||
spec.add_target_from_string(spec.architecture.target)
|
|
||||||
return True #changed
|
|
||||||
|
|
||||||
if spec.root.architecture and spec.root.architecture.target:
|
if spec.root.architecture and spec.root.architecture.target:
|
||||||
if isinstance(spec.root.architecture.target,spack.architecture.Target):
|
if isinstance(spec.root.architecture.target,spack.architecture.Target):
|
||||||
spec.architecture.target = spec.root.architecture.target
|
spec.architecture.target = spec.root.architecture.target
|
||||||
else:
|
|
||||||
spec.add_target_from_string(spec.root.architecture.target)
|
|
||||||
else:
|
else:
|
||||||
spec.architecture.target = spec.architecture.platform.target('default_target')
|
spec.architecture.target = spec.architecture.platform.target('default_target')
|
||||||
|
|
||||||
return True #changed
|
return True #changed
|
||||||
|
|
||||||
def concretize_architecture(self, spec):
|
def concretize_architecture(self, spec):
|
||||||
|
|
Loading…
Reference in a new issue