Repo guards (repolist) + PeaZip flavor guard #14
+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}..."
|
||||
|
||||
@@ -639,6 +639,19 @@ 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..."
|
||||
|
||||
# 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
|
||||
if [[ "$DE" == "plasma" || "$TWM" == "hyprland" ]]; then
|
||||
peazip_pkgs="peazip-common peazip-qt6"
|
||||
else
|
||||
@@ -650,6 +663,7 @@ 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
|
||||
|
||||
# --- 8.2 Starship prompt + Tokyo Night preset ---
|
||||
|
||||
Reference in New Issue
Block a user