fix fresh install hang: split AGS into own module, remove obsolete packages
- Remove slow fallback loop from is_package_installed (only use expac) - Move aylurs-gtk-shell from hyprland group to dedicated core/ags module with clear progress warning and user confirmation before build - Install AUR packages one at a time in install_aur (better error isolation) - Replace obsolete ttf-font-awesome with otf-font-awesome - Remove p7zip (deleted from repos and AUR)
This commit is contained in:
@@ -19,6 +19,7 @@ export OMERON_FRESH_INSTALL
|
||||
DEFAULT_MODULES=(
|
||||
"core/preflight"
|
||||
"core/packages"
|
||||
"core/ags"
|
||||
"core/dotfiles"
|
||||
"core/services"
|
||||
"homelab/setup"
|
||||
@@ -29,6 +30,7 @@ DEFAULT_MODULES=(
|
||||
|
||||
FRESH_MODULES=(
|
||||
"core/packages"
|
||||
"core/ags"
|
||||
"core/dotfiles"
|
||||
"core/services"
|
||||
"homelab/setup"
|
||||
|
||||
25
lib/utils.sh
25
lib/utils.sh
@@ -97,11 +97,6 @@ is_package_installed() {
|
||||
{ for (i=2; i<=NF; i++) if ($i == pkg) {found=1; exit} }
|
||||
END {exit !found}
|
||||
' && return 0
|
||||
else
|
||||
while IFS= read -r installed; do
|
||||
[[ -z "$installed" ]] && continue
|
||||
pacman -Qi "$installed" 2>/dev/null | grep -qP "Provides\s*:\s*.*\b${pkg}\b" && return 0
|
||||
done < <(pacman -Qq 2>/dev/null)
|
||||
fi
|
||||
return 1
|
||||
fi
|
||||
@@ -145,21 +140,23 @@ install_aur() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
local to_install=()
|
||||
local pkg
|
||||
local rc=0
|
||||
|
||||
for pkg in "${packages[@]}"; do
|
||||
if ! is_package_installed "$pkg"; then
|
||||
to_install+=("$pkg")
|
||||
if is_package_installed "$pkg"; then
|
||||
continue
|
||||
fi
|
||||
tui_info "Installing $pkg from AUR..."
|
||||
if "$aur_helper" -S --needed --noconfirm "$pkg"; then
|
||||
tui_success "$pkg installed"
|
||||
else
|
||||
tui_warn "$pkg could not be installed"
|
||||
rc=1
|
||||
fi
|
||||
done
|
||||
|
||||
if ((${#to_install[@]})); then
|
||||
log_info "Installing from AUR: ${to_install[*]}"
|
||||
"$aur_helper" -S --needed --noconfirm "${to_install[@]}"
|
||||
else
|
||||
log_info "All AUR packages already installed"
|
||||
fi
|
||||
return $rc
|
||||
}
|
||||
|
||||
replace_home_paths() {
|
||||
|
||||
44
modules/core/ags.sh
Normal file
44
modules/core/ags.sh
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
module_description() {
|
||||
printf "AGS (Aylur's Gtk Shell) - Widget system for Hyprland\n"
|
||||
}
|
||||
|
||||
module_required() { return 0; }
|
||||
module_should_skip() {
|
||||
command -v ags >/dev/null 2>&1
|
||||
}
|
||||
|
||||
module_main() {
|
||||
log_section "AGS Installation"
|
||||
|
||||
if command -v ags >/dev/null 2>&1; then
|
||||
tui_success "AGS already installed"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if ! have paru && ! have yay; then
|
||||
tui_warn "No AUR helper found. Install ags manually: paru -S aylurs-gtk-shell"
|
||||
return 0
|
||||
fi
|
||||
|
||||
local aur_helper
|
||||
have paru && aur_helper="paru" || aur_helper="yay"
|
||||
local ags_pkg="aylurs-gtk-shell"
|
||||
|
||||
tui_warn "AGS must be built from source (npm install + Go + meson)."
|
||||
tui_warn "This can take several minutes."
|
||||
printf '\n'
|
||||
|
||||
if ! tui_confirm "Install AGS now?"; then
|
||||
tui_info "AGS installation skipped. Run later: $aur_helper -S $ags_pkg"
|
||||
return 0
|
||||
fi
|
||||
|
||||
tui_info "Installing $ags_pkg from AUR..."
|
||||
if "$aur_helper" -S --needed --noconfirm "$ags_pkg"; then
|
||||
tui_success "AGS installed"
|
||||
else
|
||||
tui_warn "AGS installation failed. Try manually: $aur_helper -S $ags_pkg"
|
||||
fi
|
||||
}
|
||||
@@ -134,7 +134,7 @@ get_group_packages() {
|
||||
brightnessctl playerctl \
|
||||
grim slurp swappy hyprshot \
|
||||
wl-clipboard libnotify sshpass \
|
||||
hyprpolkitagent aylurs-gtk-shell awww
|
||||
hyprpolkitagent awww
|
||||
;;
|
||||
|
||||
gpu)
|
||||
@@ -161,7 +161,7 @@ get_group_packages() {
|
||||
fonts)
|
||||
printf '%s\n' \
|
||||
noto-fonts noto-fonts-emoji ttf-jetbrains-mono-nerd \
|
||||
ttf-font-awesome ttf-nerd-fonts-symbols ttf-dejavu
|
||||
otf-font-awesome ttf-nerd-fonts-symbols ttf-dejavu
|
||||
;;
|
||||
|
||||
tools)
|
||||
@@ -182,7 +182,7 @@ get_group_packages() {
|
||||
development)
|
||||
printf '%s\n' \
|
||||
git base-devel \
|
||||
zip unzip unrar p7zip \
|
||||
zip unzip unrar \
|
||||
ripgrep fd bat lsd \
|
||||
htop btop fastfetch
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user