Compare commits

..
4 Commits
Author SHA1 Message Date
yuri 3590c1b477 Merge pull request 'Always-packages: p7zip->7zip (retired in F44) + resilient loop' (#12) from fix/always-packages-p7zip-resilience into main 2026-11-02 16:31:09 +01:00
Pathfinder d4f04ac486 Always-packages: drop X11-only tools (numlockx, arandr)
Both are inert on the niri/Wayland target (numlockx needs X11; arandr
drives RandR). numlock at the greeter is SDDM's own setting.
2026-11-02 16:21:59 +01:00
Pathfinder a5e4facf42 Live progress line: clamp to terminal width
YuKu's promised screenshot revealed the real section-6 chaos: the live
line 'block + msg + current package' is longer than 80 columns, so
every redraw WRAPPED to a new line instead of overwriting — the screen
filled with duplicate partial progress lines.

The line is now composed once and clamped to $(tput cols) - 2 with an
ASCII '..' tail. 80-col pty run: zero wrapped live lines (the only
>82-char output left is plain-mode dnf, unchanged by design).
2026-11-02 16:19:52 +01:00
Pathfinder 835b6b0040 Always-packages: p7zip -> 7zip (retired in F44) + resilient loop
YuKu's expanded always-section died at section 6: p7zip was RETIRED
from Fedora 44 (replaced by the official '7zip' package) -> the
compression line's transaction failed -> set -e killed the whole
install after everything before it had already succeeded.

Two changes:
- p7zip -> 7zip in the Compression line (unace/unrar verified fine:
  they live in RPM Fusion, which base enables).
- The always-loop now warns in red per failing category line and
  continues — same resilience contract as the advanced menu. One
  missing package can no longer abort a 30-minute install at the
  finish line.

Harness: healthy run installs everything incl. 7zip/mpv/wget; a
deliberately broken compression line produces the red Failed block,
'finished with failures' summary, exit 0, and later categories
(mpv, wget...) still install.
2026-11-02 16:16:37 +01:00
2 changed files with 32 additions and 15 deletions
+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 else
printf '\r\033[%sm \033[0m %s' "$code" "$msg" >&2 printf '\r %s %s' "${ch[$(( f % ${#ch[@]} ))]}" "$line" >&2
fi
else
if [[ -n "$cur" ]]; then
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"
+15 -4
View File
@@ -376,15 +376,16 @@ ALWAYS_PACKAGES=(
"ghostty ghostty-bash-completion zsh zsh-syntax-highlighting" "ghostty ghostty-bash-completion zsh zsh-syntax-highlighting"
# Utilities # Utilities
"fastfetch bash-completion hwinfo lshw duf chrony man-db tree xdg-user-dirs rsync bat hddtemp powertop inxi acpi plocate nm-connection-editor" "fastfetch bash-completion hwinfo lshw duf chrony man-db tree xdg-user-dirs rsync bat hddtemp powertop inxi acpi plocate nm-connection-editor"
"python3-pylint qt6-qtsvg qt6-qtvirtualkeyboard qt6-qtmultimedia arandr catfish galculator NetworkManager network-manager-applet" "python3-pylint qt6-qtsvg qt6-qtvirtualkeyboard qt6-qtmultimedia catfish galculator NetworkManager network-manager-applet"
"numlockx pipewire pipewire-alsa pipewire-pulse wireplumber pavucontrol playerctl gparted" "pipewire pipewire-alsa pipewire-pulse wireplumber pavucontrol playerctl gparted"
"system-config-printer system-config-printer-applet system-config-printer-libs ripgrep meld btop htop" "system-config-printer system-config-printer-applet system-config-printer-libs ripgrep meld btop htop"
# File Managers # File Managers
"thunar thunar-archive-plugin thunar-volman baobab gvfs-smb squashfs-tools" "thunar thunar-archive-plugin thunar-volman baobab gvfs-smb squashfs-tools"
# Internet # Internet
"wget" "wget"
# Compression tools # Compression tools
"zip gzip p7zip unace unrar xarchiver" # (p7zip was RETIRED in Fedora 44; '7zip' is the official replacement)
"zip gzip 7zip unace unrar xarchiver"
# Office and Editors # Office and Editors
"libreoffice" "libreoffice"
# Multimedia # Multimedia
@@ -394,11 +395,21 @@ ALWAYS_PACKAGES=(
step "6 Always-installed packages" step "6 Always-installed packages"
rule rule
always_failed=""
for category in "${ALWAYS_PACKAGES[@]}"; do for category in "${ALWAYS_PACKAGES[@]}"; do
# shellcheck disable=SC2086 # shellcheck disable=SC2086
install_packages $category if ! install_packages $category; then
color_red " Failed: $category"
color_red " (a package in this line has no match — the rest of the install continues)"
always_failed="yes"
pause_if_debug
fi
done done
if [[ -z "$always_failed" ]]; then
ok "Always-packages installed." ok "Always-packages installed."
else
warn "Always-packages finished with failures (see red lines above)."
fi
pause_if_debug pause_if_debug
#------------------------------------------ #------------------------------------------