Skip to content
Snippets Groups Projects

Toolchain becomes package set part2

Merged Hans Fangohr requested to merge toolchain_becomes_package_set_part2 into main
1 file
+ 10
10
Compare changes
  • Side-by-side
  • Inline
+ 10
10
@@ -89,15 +89,15 @@ def create_log_file_names(
@@ -89,15 +89,15 @@ def create_log_file_names(
microarch: str,
microarch: str,
action: str,
action: str,
date: str = call_date_iso,
date: str = call_date_iso,
toolchain: str = None,
package_set: str = None,
) -> Union[str, None]:
) -> Union[str, None]:
"""Create log file names.
"""Create log file names.
This function creates the log file names for either the installer or
This function creates the log file names for either the installer or
the build log files.
the build log files.
If a toolchain is given, then the build log file name is created.
If a package_set is given, then the build log file name is created.
if no toolchain is given, then the installer log file name is created.
if no package_set is given, then the installer log file name is created.
The installer log file hosts the logs of the installer script, while
The installer log file hosts the logs of the installer script, while
the build log file hosts the logs of the build process as generated by the
the build log file hosts the logs of the build process as generated by the
spack_setup.sh script.
spack_setup.sh script.
@@ -113,8 +113,8 @@ def create_log_file_names(
@@ -113,8 +113,8 @@ def create_log_file_names(
action : str
action : str
action performed (install,remove,reinstall,prepare,status)
action performed (install,remove,reinstall,prepare,status)
only install and remove are valid for build log file.
only install and remove are valid for build log file.
toolchain : str
package_set : str
toolchain name (only for build log file)
package_set name (only for build log file)
Returns
Returns
-------
-------
@@ -125,16 +125,16 @@ def create_log_file_names(
@@ -125,16 +125,16 @@ def create_log_file_names(
If the action is not one that changes the files on disk ( info only actions)
If the action is not one that changes the files on disk ( info only actions)
then None is returned.
then None is returned.
"""
"""
if toolchain:
if package_set:
# if toolchain is given, then we build the build_log_file_name
# if package_set is given, then we build the build_log_file_name
if action in ["install", "remove"]:
if action in ["install", "remove"]:
log_file_name = (
log_file_name = (
f"{mpsd_release}_{microarch}_{date}_BUILD_{toolchain}_{action}.log"
f"{mpsd_release}_{microarch}_{date}_BUILD_{package_set}_{action}.log"
)
)
else:
else:
return None
return None
else:
else:
# if toolchain is not given, then we build the installer_log_file_name
# if package_set is not given, then we build the installer_log_file_name
log_file_name = f"{mpsd_release}_{microarch}_{date}_APEX_{action}.log"
log_file_name = f"{mpsd_release}_{microarch}_{date}_APEX_{action}.log"
return log_file_name
return log_file_name
@@ -266,7 +266,7 @@ def set_up_logging(loglevel="warning", file_path=None):
@@ -266,7 +266,7 @@ def set_up_logging(loglevel="warning", file_path=None):
Typical and intended use:
Typical and intended use:
print_log.info("Available toolchains are ...")
print_log.info("Available package_sets are ...")
The major difference from the normal print command is that the output
The major difference from the normal print command is that the output
will be send to the stdout (as for print) AND the file with name
will be send to the stdout (as for print) AND the file with name
Loading