Quiet dnf: spinner + package counts, full log kept for failures #7

Merged
yuri merged 4 commits from feat/quiet-dnf into feat/gum-tui 2026-10-27 19:49:14 +01:00
Owner

Every transaction hides its wall of text behind a spinner and prints one summary line. Full output goes to /tmp/fedora-setup-dnf-.log and the last 20 lines print in red on failure — nothing hidden, just compact. Unattended/no-gum runs keep plain output.

Plus: fallback menus accept x again, and two small fallback bugs fixed (stray newline in captured answers, pluralization).

Note: branches on top of feat/gum-tui (PR #6) — merge that first, this PR retargets or stacks cleanly.

Every transaction hides its wall of text behind a spinner and prints one summary line. Full output goes to /tmp/fedora-setup-dnf-<uid>.log and the last 20 lines print in red on failure — nothing hidden, just compact. Unattended/no-gum runs keep plain output. Plus: fallback menus accept x again, and two small fallback bugs fixed (stray newline in captured answers, pluralization). Note: branches on top of feat/gum-tui (PR #6) — merge that first, this PR retargets or stacks cleanly.
yuri added 1 commit 2026-10-27 19:20:37 +01:00
ui_quiet_run wraps every install_packages/install_optional/group
install/remove and the system update: while gum is available and the
run is interactive, dnf output is hidden behind a spinner, then a
single 'Installing: <pkgs> (N packages)' line. Full output is appended
to $SETUP_DNF_LOG (/tmp/fedora-setup-dnf-<uid>.log); on failure the
last 20 lines print in red so nothing is lost. Unattended and no-gum
runs keep plain full output (logs/cron contract).

Also: fallback ui_choose accepts 'x' to exit (muscle memory from the
old menu), fixed a stray stdout newline leaking into captured answers
(same class as the earlier '\nno' bug), fixed pluralization.

Harness: piped fallback, pty gum run incl. a failing VirtualBox pick
(red failure + log tail, menu survives, subsequent qemu install ok),
unattended regression.
yuri added 1 commit 2026-10-27 19:31:23 +01:00
gum spin rendered static on the real VM during long transactions.
ui_quiet_run now draws its own line: braille spinner frame + the
package dnf is currently working on (from the transaction log), at
150ms ticks. Works without gum (pure bash), gated on interactive
terminal, not on gum.

set -e + pipefail bug found via pty trace: the first tick races the
child's first log line, grep exits 1 (no match) and pipefail turns the
whole substitution nonzero, killing the script silently at the first
frame. || true on the substitution pipeline fixes it.
yuri added 1 commit 2026-10-27 19:37:23 +01:00
First sudo call of the session printed its password prompt straight
into the live progress line: 'Installing (optional): gum[sudo]
password for yuri:' (VM screenshot). sudo -v asks once, on a clean
screen, right after the banner; the timestamp refreshes on every later
sudo use, so one prompt covers the whole run.
yuri added 1 commit 2026-10-27 19:42:32 +01:00
The braille spinner frames and the em-dash separator are multibyte
UTF-8; on the VM session they rendered as changing random letters, not
a spinner. Frames are now the classic | / - \ cycle, the separator is
':', and the two user-facing info lines that carried em-dashes are
ASCII too. Verified under LANG=C LC_ALL=C in a pty: zero non-ASCII
bytes in the entire output.
yuri merged commit 3d75a666a4 into feat/gum-tui 2026-10-27 19:49:14 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yuri/fedora#7