Show what a run is doing, and record when one is cut short
A run that held back a blocker then upgraded 214 packages printed one line and then nothing for nearly five minutes while pacman downloaded and installed. It looked hung, so it got killed - during pacman's uninterruptible commit phase, which meant the packages landed but our bookkeeping never did. The menu then kept showing a failure from a previous run on a fully up-to-date machine. pacman, the AUR helper and flatpak now stream their output when a person is watching, and the progress bar is left enabled for that case. Timer runs are unchanged: quiet, --noprogressbar, everything captured in the log. Interactivity is decided once at startup rather than tested at the point of use. cau_pacman_flags runs inside a process substitution, so its stdout is always a pipe and a -t 1 check there would have silently always been false. INT/TERM/HUP now record last_result=interrupted, so a run that is stopped says so instead of leaving the previous verdict standing.
This commit is contained in:
1 parent
9fd2458d20
commit
243115ea19
7 files changed
+68
-5
No files matched your search
@@ -81,6 +81,10 @@ cau_ui_status() {
|
||||
printf '\n %s%s%s\n' "$CAU_C_YELLOW" \
|
||||
"$(cau_msg "The last run reported a problem - see 'cachy-auto-update log'.")" \
|
||||
"$CAU_C_RESET"
|
||||
elif [[ $result == interrupted ]]; then
|
||||
printf '\n %s%s%s\n' "$CAU_C_YELLOW" \
|
||||
"$(cau_msg "The last run was stopped before it finished.")" \
|
||||
"$CAU_C_RESET"
|
||||
fi
|
||||
if [[ $reboot == 1 ]]; then
|
||||
printf '\n %s%s%s\n' "$CAU_C_YELLOW" \
|
||||
|
||||
Reference in new issue
Block a user