Always-packages: p7zip->7zip (retired in F44) + resilient loop #12

Merged
yuri merged 3 commits from fix/always-packages-p7zip-resilience into main 2026-11-02 16:31:09 +01:00
Showing only changes of commit a5e4facf42 - Show all commits
+16 -10
View File
@@ -143,19 +143,25 @@ ui_quiet_run() {
cur=$(sed -n "$((before+1)),\$p" "$log" 2>/dev/null \ cur=$(sed -n "$((before+1)),\$p" "$log" 2>/dev/null \
| grep -E '^(Installing|Upgrading|Downgrading|Removing|Verifying|Preparing|Cleanup):' \ | grep -E '^(Installing|Upgrading|Downgrading|Removing|Verifying|Preparing|Cleanup):' \
| tail -n 1 || true) | tail -n 1 || true)
# Compose ONCE, then clamp to the terminal width: a live line longer
# than the screen wraps on every redraw and floods the screen with
# duplicate partial lines (VM-proven on the 80-col TTY).
local cols line
cols=$(tput cols 2>/dev/null)
[[ "$cols" =~ ^[0-9]+$ ]] || cols=80
if [[ -n "$cur" ]]; then
line="$msg: $cur"
else
line="$msg"
fi
if (( ${#line} > cols - 2 )); then
line="${line:0:cols-4}.."
fi
if (( depth >= 16 )); then if (( depth >= 16 )); then
local code="${bg[$(( f % ${#bg[@]} ))]}" local code="${bg[$(( f % ${#bg[@]} ))]}"
if [[ -n "$cur" ]]; then printf '\r\033[%sm \033[0m %s' "$code" "$line" >&2
printf '\r\033[%sm \033[0m %s: %s' "$code" "$msg" "$cur" >&2
else
printf '\r\033[%sm \033[0m %s' "$code" "$msg" >&2
fi
else else
if [[ -n "$cur" ]]; then printf '\r %s %s' "${ch[$(( f % ${#ch[@]} ))]}" "$line" >&2
printf '\r %s %s: %s' "${ch[$(( f % ${#ch[@]} ))]}" "$msg" "$cur" >&2
else
printf '\r %s %s' "${ch[$(( f % ${#ch[@]} ))]}" "$msg" >&2
fi
fi fi
f=$(( f + 1 )) f=$(( f + 1 ))
sleep "$tick" sleep "$tick"