Skip to content
Snippets Groups Projects
Commit a9c5da5b authored by Hans Fangohr's avatar Hans Fangohr
Browse files

reviewed first function (toolchain -> package_set)

parent 3e45a965
No related branches found
No related tags found
1 merge request!64Toolchain becomes package set part2
Pipeline #371444 failed
This commit is part of merge request !64. Comments created here will be created in the context of that merge request.
......@@ -89,15 +89,15 @@ def create_log_file_names(
microarch: str,
action: str,
date: str = call_date_iso,
toolchain: str = None,
package_set: str = None,
) -> Union[str, None]:
"""Create log file names.
This function creates the log file names for either the installer or
the build log files.
If a toolchain is given, then the build log file name is created.
if no toolchain is given, then the installer log file name is created.
If a package_set is given, then the build 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 build log file hosts the logs of the build process as generated by the
spack_setup.sh script.
......@@ -113,8 +113,8 @@ def create_log_file_names(
action : str
action performed (install,remove,reinstall,prepare,status)
only install and remove are valid for build log file.
toolchain : str
toolchain name (only for build log file)
package_set : str
package_set name (only for build log file)
Returns
-------
......@@ -125,16 +125,16 @@ def create_log_file_names(
If the action is not one that changes the files on disk ( info only actions)
then None is returned.
"""
if toolchain:
# if toolchain is given, then we build the build_log_file_name
if package_set:
# if package_set is given, then we build the build_log_file_name
if action in ["install", "remove"]:
log_file_name = (
f"{mpsd_release}_{microarch}_{date}_BUILD_{toolchain}_{action}.log"
f"{mpsd_release}_{microarch}_{date}_BUILD_{package_set}_{action}.log"
)
else:
return None
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"
return log_file_name
......@@ -266,7 +266,7 @@ def set_up_logging(loglevel="warning", file_path=None):
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
will be send to the stdout (as for print) AND the file with name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment