"""For each package to build: builds it, signs it, and moves it to
"pkg_out_dir"."""
+ atexit.register(build_print_pkg_info, pkgs, other_state)
+
if not get_sudo_privileges():
log_print(
"ERROR: Failed to get sudo privileges", other_state=other_state
),
)
- max_name_len = 1
- for pkg in pkgs:
- if len(pkg) + 1 > max_name_len:
- max_name_len = len(pkg) + 1
- for pkg in pkgs:
- name_space = " " * (max_name_len - len(pkg))
- log_print(
- f'"{pkg}"{name_space}status: {pkg_state[pkg]["build_status"]}',
- other_state=other_state,
- )
-
def get_latest_pkg(pkg: str, cache_dir: str):
"""Gets the latest pkg from the specified "cache_dir" and return its
return to_update
+def build_print_pkg_info(pkgs: tuple[str], other_state: dict[str, any]):
+ """Prints the current "build" state of the given pkgs."""
+ max_name_len = 1
+ for pkg in pkgs:
+ if len(pkg) + 1 > max_name_len:
+ max_name_len = len(pkg) + 1
+ for pkg in pkgs:
+ name_space = " " * (max_name_len - len(pkg))
+ log_print(
+ f'"{pkg}"{name_space}status: {pkg_state[pkg]["build_status"]}',
+ other_state=other_state,
+ )
+
+
def test_gpg_passphrase(
signing_gpg_dir: str, signing_key_fp: str, passphrase: str
):