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:
+13
-4
@@ -283,9 +283,17 @@ install_group_any() {
|
||||
#------------------------------------------
|
||||
# Third-party repos
|
||||
#------------------------------------------
|
||||
# True when a repo id is CONFIGURED, whatever installed it. This is the
|
||||
# reliable source of truth: a machine can have the repo without the
|
||||
# -release RPM (hand-added .repo file) — and bootstrapping over an existing
|
||||
# repo id via --repofrompath collides and fails (laptop-proven).
|
||||
repo_enabled() {
|
||||
dnf repolist --all 2>/dev/null | awk '{print $1}' | grep -qx "$1"
|
||||
}
|
||||
|
||||
add_terra_repo() {
|
||||
if pkg_installed terra-release; then
|
||||
ok "Terra repository already installed."
|
||||
if pkg_installed terra-release || repo_enabled terra; then
|
||||
ok "Terra repository already present."
|
||||
return 0
|
||||
fi
|
||||
info "Adding Terra repository (Fyra Labs)..."
|
||||
@@ -299,8 +307,9 @@ add_terra_repo() {
|
||||
add_rpmfusion_repo() {
|
||||
local rel
|
||||
rel=$(rpm -E %fedora)
|
||||
if pkg_installed rpmfusion-free-release rpmfusion-nonfree-release; then
|
||||
ok "RPM Fusion already installed."
|
||||
if pkg_installed rpmfusion-free-release rpmfusion-nonfree-release \
|
||||
|| { repo_enabled rpmfusion-free && repo_enabled rpmfusion-nonfree; }; then
|
||||
ok "RPM Fusion already present."
|
||||
return 0
|
||||
fi
|
||||
info "Enabling RPM Fusion (free + nonfree) for Fedora ${rel}..."
|
||||
|
||||
Reference in New Issue
Block a user