Repo guards check repolist, not just RPMs; PeaZip skips when any flavor exists

Laptop run (YuKu, existing machine) exposed two fresh-install blind
spots:

1. Terra add failed on a machine that already HAD the repo but not a
   queryable terra-release RPM — bootstrapping --repofrompath over an
   existing repo id collides. New repo_enabled() checks dnf repolist
   (the source of truth); add_terra_repo and add_rpmfusion_repo now
   skip when the repo is configured OR the release RPM present.

2. PeaZip tailoring tried gtk3 over an existing peazip-qt5: all UI
   flavors ship /usr/bin/peazip and file-conflict, transaction died.
   Any installed flavor (qt5/qt6/gtk3/gtk2) now wins and the section
   skips with the flavor named.

Harness: laptop sim (repo configured, peazip-qt5 present) -> zero
bootstrap calls, PeaZip skipped; fresh machine -> terra bootstraps +
gtk3 installs; re-run -> skip via repolist; peazip-qt6 + hyprland ->
skip; unattended/piped green.
This commit is contained in:
Pathfinder
2026-11-11 15:35:15 +01:00
parent 8fb78651c9
commit b79735d82e
2 changed files with 36 additions and 13 deletions
+23 -9
View File
@@ -639,16 +639,30 @@ rule
# --- 8.1 PeaZip: toolkit variant follows the session (Qt6 for Qt-ish
# environments, GTK3 for the rest) ---
info "Tailoring toolkits for DE=$DE / TWM=$TWM..."
if [[ "$DE" == "plasma" || "$TWM" == "hyprland" ]]; then
peazip_pkgs="peazip-common peazip-qt6"
# First: is ANY PeaZip flavor already installed? The UI flavors all ship
# /usr/bin/peazip and file-conflict with each other — installing gtk3 over
# an existing qt5 dies mid-transaction (laptop-proven). Any present flavor
# wins; skipping is correct.
peazip_existing=""
local_v=""
for local_v in peazip-qt5 peazip-qt6 peazip-gtk3 peazip-gtk2; do
pkg_installed "$local_v" && peazip_existing="$local_v"
done
if [[ -n "$peazip_existing" ]]; then
ok "PeaZip already present ($peazip_existing) - skipping."
else
# XFCE, GNOME, Niri, MangoWC, chadwm: lightweight/generic toolkits
peazip_pkgs="peazip-common peazip-gtk3"
fi
# shellcheck disable=SC2086
if ! install_packages $peazip_pkgs; then
color_red " Failed: $peazip_pkgs"
color_red " (continuing — PeaZip is a convenience, not a dependency)"
if [[ "$DE" == "plasma" || "$TWM" == "hyprland" ]]; then
peazip_pkgs="peazip-common peazip-qt6"
else
# XFCE, GNOME, Niri, MangoWC, chadwm: lightweight/generic toolkits
peazip_pkgs="peazip-common peazip-gtk3"
fi
# shellcheck disable=SC2086
if ! install_packages $peazip_pkgs; then
color_red " Failed: $peazip_pkgs"
color_red " (continuing — PeaZip is a convenience, not a dependency)"
fi
fi
pause_if_debug