From 41d7d0155e79ce7ff63bac1fba0ab0a586c4e68a Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Fri, 27 Jan 2023 20:03:23 +0100 Subject: [PATCH] armbian-next: docker: fix: not all `find`'s are made equal, back to `-mtime +1` (full 24-hour period needed for match) --- lib/functions/host/docker.sh | 4 ++-- lib/functions/logging/runners.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/functions/host/docker.sh b/lib/functions/host/docker.sh index 5be96e63ab..4d39270995 100755 --- a/lib/functions/host/docker.sh +++ b/lib/functions/host/docker.sh @@ -281,8 +281,8 @@ function docker_cli_build_dockerfile() { run_host_command_logged mkdir -p "${docker_marker_dir}" - # Find files under "${SRC}"/cache/docker that are older than 12 hours. - EXPIRED_MARKER="$(find "${docker_marker_dir}" -type f -mtime +12h -exec echo -n {} \;)" + # Find files under "${SRC}"/cache/docker that are older than a full 24-hour period. + EXPIRED_MARKER="$(find "${docker_marker_dir}" -type f -mtime +1 -exec echo -n {} \;)" display_alert "Expired marker?" "${EXPIRED_MARKER}" "debug" if [[ "x${EXPIRED_MARKER}x" != "xx" ]]; then diff --git a/lib/functions/logging/runners.sh b/lib/functions/logging/runners.sh index f84c45985c..4822345a47 100644 --- a/lib/functions/logging/runners.sh +++ b/lib/functions/logging/runners.sh @@ -196,7 +196,7 @@ function run_host_command_logged_raw() { echo -e "${bright_red_color:-}-->--> command failed with error code ${exit_code} after $((SECONDS - seconds_start)) seconds${normal_color:-}" >> "${CURRENT_LOGFILE}" fi - # @TODO: send these _ONLY_ to logfile. there's enough on screen already... + # send these _ONLY_ to logfile. there's enough on screen already... display_alert_skip_screen=1 display_alert "stacktrace for failed command" "exit code ${exit_code}:$*\n$(stack_color="${magenta_color:-}" show_caller_full)" "wrn" # Obtain extra info about error, eg, log files produced, extra messages set by caller, etc.