Compare commits
No commits in common. "9701fff99166e79f1c706ef0a86d214d2298e8af" and "dc02848b2ea1d667ecfcd7b5de00530d42dc7f5b" have entirely different histories.
9701fff991
...
dc02848b2e
2 changed files with 6 additions and 43 deletions
|
@ -24,8 +24,6 @@ error_on_limit = false
|
||||||
datetime_in_local_time = true
|
datetime_in_local_time = true
|
||||||
# If true, all builds will be done in a tmpfs. Recommended to have a lot of RAM and/or swap.
|
# If true, all builds will be done in a tmpfs. Recommended to have a lot of RAM and/or swap.
|
||||||
tmpfs = false
|
tmpfs = false
|
||||||
# If true, only packages to be built will be printed when USR1 is signaled.
|
|
||||||
print_state_info_only_building_sigusr1 = true
|
|
||||||
########## END OF MANDATORY VARIABLES
|
########## END OF MANDATORY VARIABLES
|
||||||
|
|
||||||
# Each [[entry]] needs a "name".
|
# Each [[entry]] needs a "name".
|
||||||
|
|
47
update.py
47
update.py
|
@ -1758,29 +1758,12 @@ def print_state_info_and_get_update_list(
|
||||||
name_space = " " * (max_name_len - len(pkg_name))
|
name_space = " " * (max_name_len - len(pkg_name))
|
||||||
if "state" in pkg_dict:
|
if "state" in pkg_dict:
|
||||||
state_str = '"' + pkg_dict["state"] + '"'
|
state_str = '"' + pkg_dict["state"] + '"'
|
||||||
if (
|
log_print(
|
||||||
"print_state_SIGUSR1" in other_state
|
f" {pkg_name}{name_space}: pre_state is {state_str: <13}, build_state is \"{pkg_dict['build_status']}\"",
|
||||||
and type(other_state["print_state_SIGUSR1"]) is bool
|
other_state=other_state,
|
||||||
and other_state["print_state_SIGUSR1"]
|
)
|
||||||
and "print_state_info_only_building_sigusr1" in other_state
|
if pkg_dict["state"] == "install":
|
||||||
and type(other_state["print_state_info_only_building_sigusr1"])
|
to_update.append(pkg_name)
|
||||||
is bool
|
|
||||||
and other_state["print_state_info_only_building_sigusr1"]
|
|
||||||
):
|
|
||||||
if state_str == '"install"':
|
|
||||||
log_print(
|
|
||||||
f" {pkg_name}{name_space}: pre_state is {state_str: <13}, build_state is \"{pkg_dict['build_status']}\"",
|
|
||||||
other_state=other_state,
|
|
||||||
)
|
|
||||||
if pkg_dict["state"] == "install":
|
|
||||||
to_update.append(pkg_name)
|
|
||||||
else:
|
|
||||||
log_print(
|
|
||||||
f" {pkg_name}{name_space}: pre_state is {state_str: <13}, build_state is \"{pkg_dict['build_status']}\"",
|
|
||||||
other_state=other_state,
|
|
||||||
)
|
|
||||||
if pkg_dict["state"] == "install":
|
|
||||||
to_update.append(pkg_name)
|
|
||||||
else:
|
else:
|
||||||
log_print(
|
log_print(
|
||||||
f" {pkg_name}{name_space}: not reached",
|
f" {pkg_name}{name_space}: not reached",
|
||||||
|
@ -1910,11 +1893,7 @@ def signal_handler(sig, frame):
|
||||||
"""Handle SIGINT and SIGUSR1."""
|
"""Handle SIGINT and SIGUSR1."""
|
||||||
global OTHER_STATE, PKG_STATE
|
global OTHER_STATE, PKG_STATE
|
||||||
if OTHER_STATE is not None and PKG_STATE is not None:
|
if OTHER_STATE is not None and PKG_STATE is not None:
|
||||||
OTHER_STATE["print_state_SIGUSR1"] = (
|
|
||||||
signal.Signals(sig) is signal.SIGUSR1
|
|
||||||
)
|
|
||||||
print_state_info_and_get_update_list(OTHER_STATE, PKG_STATE)
|
print_state_info_and_get_update_list(OTHER_STATE, PKG_STATE)
|
||||||
OTHER_STATE["print_state_SIGUSR1"] = False
|
|
||||||
if signal.Signals(sig) is not signal.SIGINT:
|
if signal.Signals(sig) is not signal.SIGINT:
|
||||||
return
|
return
|
||||||
OTHER_STATE["stop_building"] = True
|
OTHER_STATE["stop_building"] = True
|
||||||
|
@ -2179,8 +2158,6 @@ def main():
|
||||||
other_state["logs_dir"] = None
|
other_state["logs_dir"] = None
|
||||||
other_state["log_limit"] = 1024 * 1024 * 1024
|
other_state["log_limit"] = 1024 * 1024 * 1024
|
||||||
other_state["error_on_limit"] = False
|
other_state["error_on_limit"] = False
|
||||||
other_state["print_state_SIGUSR1"] = False
|
|
||||||
other_state["print_state_info_only_building_sigusr1"] = True
|
|
||||||
if args.pkg and not args.config:
|
if args.pkg and not args.config:
|
||||||
for pkg in args.pkg:
|
for pkg in args.pkg:
|
||||||
pkg_state[pkg] = {}
|
pkg_state[pkg] = {}
|
||||||
|
@ -2361,18 +2338,6 @@ def main():
|
||||||
other_state["tmpfs"] = True
|
other_state["tmpfs"] = True
|
||||||
else:
|
else:
|
||||||
other_state["tmpfs"] = False
|
other_state["tmpfs"] = False
|
||||||
if (
|
|
||||||
"print_state_info_only_building_sigusr1" in d
|
|
||||||
and type(d["print_state_info_only_building_sigusr1"]) is bool
|
|
||||||
):
|
|
||||||
other_state["print_state_info_only_building_sigusr1"] = d[
|
|
||||||
"print_state_info_only_building_sigusr1"
|
|
||||||
]
|
|
||||||
print(
|
|
||||||
'State info print on SIGUSR1 is set to: "{}"'.format(
|
|
||||||
other_state["print_state_info_only_building_sigusr1"]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
log_print(
|
log_print(
|
||||||
'ERROR: At least "--config" or "--pkg" must be specified',
|
'ERROR: At least "--config" or "--pkg" must be specified',
|
||||||
|
|
Loading…
Reference in a new issue