Restore bootstrapping from binaries
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This commit is contained in:
parent
543f830f57
commit
352442a383
@ -625,24 +625,30 @@ def tarball_directory_name(spec):
|
|||||||
Return name of the tarball directory according to the convention
|
Return name of the tarball directory according to the convention
|
||||||
<os>-<architecture>/<compiler>/<package>-<version>/
|
<os>-<architecture>/<compiler>/<package>-<version>/
|
||||||
"""
|
"""
|
||||||
# FIXME (compiler as nodes): fix the naming scheme later to avoid using compiler
|
if not spec.compiler_as_nodes():
|
||||||
return spec.format_path(
|
return spec.format_path(
|
||||||
f"{spec.architecture}/{spec.compiler_annotation.name}-{spec.compiler_annotation.version}/"
|
f"{spec.architecture}/{spec.compiler_annotation.name}"
|
||||||
f"{spec.name}-{spec.version}"
|
f"-{spec.compiler_annotation.version}/{spec.name}-{spec.version}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
return spec.format_path(f"{spec.architecture.platform}/{spec.name}-{spec.version}")
|
||||||
|
|
||||||
|
|
||||||
def tarball_name(spec, ext):
|
def tarball_name(spec, ext):
|
||||||
"""
|
"""
|
||||||
Return the name of the tarfile according to the convention
|
Return the name of the tarfile according to the convention
|
||||||
<os>-<architecture>-<package>-<dag_hash><ext>
|
<os>-<architecture>-<package>-<dag_hash><ext>
|
||||||
"""
|
"""
|
||||||
# FIXME (compiler as nodes): fix the naming scheme later to avoid using compiler
|
if not spec.compiler_as_nodes():
|
||||||
spec_formatted = (
|
spec_formatted = (
|
||||||
f"{spec.architecture}-{spec.compiler_annotation.name}"
|
f"{spec.architecture}-{spec.compiler_annotation.name}"
|
||||||
f"-{spec.compiler_annotation.version}-{spec.name}"
|
f"-{spec.compiler_annotation.version}-{spec.name}"
|
||||||
f"-{spec.version}-{spec.dag_hash()}"
|
f"-{spec.version}-{spec.dag_hash()}"
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
spec_formatted = (
|
||||||
|
f"{spec.architecture.platform}-{spec.name}-{spec.version}-{spec.dag_hash()}"
|
||||||
|
)
|
||||||
return f"{spec_formatted}{ext}"
|
return f"{spec_formatted}{ext}"
|
||||||
|
|
||||||
|
|
||||||
|
@ -4493,6 +4493,10 @@ def attach_git_version_lookup(self):
|
|||||||
if isinstance(v, vn.GitVersion) and v._ref_version is None:
|
if isinstance(v, vn.GitVersion) and v._ref_version is None:
|
||||||
v.attach_lookup(spack.version.git_ref_lookup.GitRefLookup(self.fullname))
|
v.attach_lookup(spack.version.git_ref_lookup.GitRefLookup(self.fullname))
|
||||||
|
|
||||||
|
def compiler_as_nodes(self) -> bool:
|
||||||
|
"""Returns True if compiler are treated as nodes"""
|
||||||
|
return not hasattr(self, "compiler_annotation")
|
||||||
|
|
||||||
|
|
||||||
class VariantMap(lang.HashableMap):
|
class VariantMap(lang.HashableMap):
|
||||||
"""Map containing variant instances. New values can be added only
|
"""Map containing variant instances. New values can be added only
|
||||||
|
Loading…
Reference in New Issue
Block a user